]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed handling of null widgets in split panel
authorArtur Signell <artur@vaadin.com>
Wed, 14 Mar 2012 11:02:52 +0000 (13:02 +0200)
committerArtur Signell <artur@vaadin.com>
Wed, 14 Mar 2012 14:01:13 +0000 (16:01 +0200)
src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanel.java

index 046b2fff915d388836f63dcfcb38af3965fa5d64..fbeb4ff96365d4dd00115c9431555de50e0b23be 100644 (file)
@@ -332,7 +332,9 @@ public class VAbstractSplitPanel extends ComplexPanel {
         if (firstChild != null) {
             firstChild.removeFromParent();
         }
-        super.add(w, firstContainer);
+        if (w != null) {
+            super.add(w, firstContainer);
+        }
         firstChild = w;
     }
 
@@ -340,7 +342,9 @@ public class VAbstractSplitPanel extends ComplexPanel {
         if (secondChild != null) {
             secondChild.removeFromParent();
         }
-        super.add(w, secondContainer);
+        if (w != null) {
+            super.add(w, secondContainer);
+        }
         secondChild = w;
     }