]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed NPE occuring when Table is quickly added and removed
authorArtur Signell <artur@vaadin.com>
Sun, 25 Mar 2012 15:37:37 +0000 (18:37 +0300)
committerArtur Signell <artur@vaadin.com>
Sun, 25 Mar 2012 15:37:37 +0000 (18:37 +0300)
src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java

index 4e2c43dcc4058597b5072a1d8c0cc5f93e368ce3..09f25a239bcc5f202f2570880b5d9746dc1aa2c4 100644 (file)
@@ -6648,6 +6648,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
     private boolean isDynamicHeight() {
         ComponentConnector paintable = ConnectorMap.get(client).getConnector(
                 this);
+        if (paintable == null) {
+            // This should be refactored. As isDynamicHeight can be called from
+            // a timer it is possible that the connector has been unregistered
+            // when this method is called, causing getConnector to return null.
+            return false;
+        }
         return paintable.isUndefinedHeight();
     }