diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-06-08 10:59:13 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-06-08 10:59:13 +0300 |
commit | 107dffc5cbf8df34450cd9e49d19abd6dc7f4634 (patch) | |
tree | f553177365a2afc51769baf165b675831a0fe219 | |
parent | ac9c7f065645874a6cf7f78bfb7068703b171418 (diff) | |
download | vaadin-framework-107dffc5cbf8df34450cd9e49d19abd6dc7f4634.tar.gz vaadin-framework-107dffc5cbf8df34450cd9e49d19abd6dc7f4634.zip |
Don't fail if opening tooltip for disappeared component
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ConnectorMap.java | 12 |
1 files 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<? extends ServerConnector> getConnectors() { |