From: Ilia Motornyi Date: Thu, 19 Jul 2018 12:14:51 +0000 (+0300) Subject: Fix removal tabsheets if last one is selected (#11074) X-Git-Tag: 7.7.14~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f19e029ff7261b89305e74ac4d3b9b1775b3f159;p=vaadin-framework.git Fix removal tabsheets if last one is selected (#11074) Backport #11070 Related to #10925 --- diff --git a/client/src/main/java/com/vaadin/client/ui/VTabsheet.java b/client/src/main/java/com/vaadin/client/ui/VTabsheet.java index f2f831a9f7..906ac5700a 100644 --- a/client/src/main/java/com/vaadin/client/ui/VTabsheet.java +++ b/client/src/main/java/com/vaadin/client/ui/VTabsheet.java @@ -634,7 +634,7 @@ public class VTabsheet extends VTabsheetBase for (int i = oldPosition - 1; i >= 0; i--) { Tab tab = getTab(i); - if (!tab.isHiddenOnServer()) { + if (tab != null && !tab.isHiddenOnServer()) { return i; } }