From d1e6bd52d0ff16890f64e01064fbd82e514aed05 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Tue, 7 Jul 2015 16:41:33 +0300 Subject: Fix NPE caused by fix for Grid resizing with split panel (#18370) Change-Id: Ic8b5898facf559f253357e6cde6ee2b10be63a79 --- client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java | 4 ++-- client/src/com/vaadin/client/ui/VSplitPanelVertical.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java b/client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java index 5d918153b3..1a3e699b20 100644 --- a/client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java +++ b/client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java @@ -28,11 +28,11 @@ public class VSplitPanelHorizontal extends VAbstractSplitPanel { @Override protected void startResize() { - if (isWidgetFullWidth(getFirstWidget())) { + if (getFirstWidget() != null && isWidgetFullWidth(getFirstWidget())) { getFirstContainer().getStyle().setOverflow(Overflow.HIDDEN); } - if (isWidgetFullWidth(getSecondWidget())) { + if (getSecondWidget() != null && isWidgetFullWidth(getSecondWidget())) { getSecondContainer().getStyle().setOverflow(Overflow.HIDDEN); } } diff --git a/client/src/com/vaadin/client/ui/VSplitPanelVertical.java b/client/src/com/vaadin/client/ui/VSplitPanelVertical.java index 376b18e171..7baed03ca3 100644 --- a/client/src/com/vaadin/client/ui/VSplitPanelVertical.java +++ b/client/src/com/vaadin/client/ui/VSplitPanelVertical.java @@ -28,11 +28,11 @@ public class VSplitPanelVertical extends VAbstractSplitPanel { @Override protected void startResize() { - if (isWidgetFullHeight(getFirstWidget())) { + if (getFirstWidget() != null && isWidgetFullHeight(getFirstWidget())) { getFirstContainer().getStyle().setOverflow(Overflow.HIDDEN); } - if (isWidgetFullHeight(getSecondWidget())) { + if (getSecondWidget() != null && isWidgetFullHeight(getSecondWidget())) { getSecondContainer().getStyle().setOverflow(Overflow.HIDDEN); } } -- cgit v1.2.3