]> source.dussan.org Git - vaadin-framework.git/commitdiff
Don't fail if opening tooltip for disappeared component
authorLeif Åstrand <leif@vaadin.com>
Fri, 8 Jun 2012 07:59:13 +0000 (10:59 +0300)
committerLeif Åstrand <leif@vaadin.com>
Fri, 8 Jun 2012 07:59:13 +0000 (10:59 +0300)
src/com/vaadin/terminal/gwt/client/ConnectorMap.java

index 816c4f62e3757654f6402de98cca3e0efebfe8a1..efb50b5e008a07ae24f96f243b63801443e91319 100644 (file)
@@ -208,12 +208,20 @@ public class ConnectorMap {
      */
     @Deprecated
     public TooltipInfo getTooltipInfo(ComponentConnector paintable, Object key) {
-        return getComponentDetail(paintable).getTooltipInfo(key);
+        ComponentDetail componentDetail = getComponentDetail(paintable);
+        if (componentDetail == null) {
+            return null;
+        }
+        return componentDetail.getTooltipInfo(key);
     }
 
     @Deprecated
     public TooltipInfo getWidgetTooltipInfo(Widget widget, Object key) {
-        return getTooltipInfo(getConnector(widget), key);
+        ComponentConnector connector = getConnector(widget);
+        if (connector == null) {
+            return null;
+        }
+        return getTooltipInfo(connector, key);
     }
 
     public Collection<? extends ServerConnector> getConnectors() {