From e7adb2ac481509392f29be5c072266e61878e5e9 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 25 Mar 2012 18:37:37 +0300 Subject: [PATCH] Fixed NPE occuring when Table is quickly added and removed --- src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index 4e2c43dcc4..09f25a239b 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -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(); } -- 2.39.5