From 107dffc5cbf8df34450cd9e49d19abd6dc7f4634 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Fri, 8 Jun 2012 10:59:13 +0300 Subject: [PATCH] Don't fail if opening tooltip for disappeared component --- src/com/vaadin/terminal/gwt/client/ConnectorMap.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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() { -- 2.39.5