From f19e029ff7261b89305e74ac4d3b9b1775b3f159 Mon Sep 17 00:00:00 2001 From: Ilia Motornyi Date: Thu, 19 Jul 2018 15:14:51 +0300 Subject: [PATCH] Fix removal tabsheets if last one is selected (#11074) Backport #11070 Related to #10925 --- client/src/main/java/com/vaadin/client/ui/VTabsheet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.39.5