]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix NPE caused by fix for Grid resizing with split panel (#18370)
authorTeemu Suo-Anttila <teemusa@vaadin.com>
Tue, 7 Jul 2015 13:41:33 +0000 (16:41 +0300)
committerHenri Sara <hesara@vaadin.com>
Wed, 8 Jul 2015 06:56:33 +0000 (06:56 +0000)
Change-Id: Ic8b5898facf559f253357e6cde6ee2b10be63a79

client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java
client/src/com/vaadin/client/ui/VSplitPanelVertical.java

index 5d918153b3931b4c8beb9cd19c3e7b2fc9108b33..1a3e699b208cdbc4c0759d2c5170ea13ea5d3b0c 100644 (file)
@@ -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);
         }
     }
index 376b18e171a8463819ea5144d70c3aa67e8f46f8..7baed03ca3d2638487f903b392fa1323a4036710 100644 (file)
@@ -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);
         }
     }