]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix removal tabsheets if last one is selected (#11074)
authorIlia Motornyi <elmot@vaadin.com>
Thu, 19 Jul 2018 12:14:51 +0000 (15:14 +0300)
committerGitHub <noreply@github.com>
Thu, 19 Jul 2018 12:14:51 +0000 (15:14 +0300)
Backport #11070

Related to #10925

client/src/main/java/com/vaadin/client/ui/VTabsheet.java

index f2f831a9f7e6fff6c39c06b99dd3bbab4ed0df73..906ac5700ac2c8fe18e598d7c8450c3b8113aa43 100644 (file)
@@ -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;
                 }
             }