From: Leif Åstrand Date: Fri, 8 Jun 2012 07:59:13 +0000 (+0300) Subject: Don't fail if opening tooltip for disappeared component X-Git-Tag: 7.0.0.alpha3~194 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=107dffc5cbf8df34450cd9e49d19abd6dc7f4634;p=vaadin-framework.git Don't fail if opening tooltip for disappeared component --- diff --git a/src/com/vaadin/terminal/gwt/client/ConnectorMap.java b/src/com/vaadin/terminal/gwt/client/ConnectorMap.java index 816c4f62e3..efb50b5e00 100644 --- a/src/com/vaadin/terminal/gwt/client/ConnectorMap.java +++ b/src/com/vaadin/terminal/gwt/client/ConnectorMap.java @@ -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 getConnectors() {