From: Artur Signell Date: Tue, 20 Mar 2012 10:01:50 +0000 (+0200) Subject: #8500 Avoid unregistering components that have been moved from one X-Git-Tag: 7.0.0.alpha2~275 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1d3d28469ad02ed84abb743fc3bd367408ea737b;p=vaadin-framework.git #8500 Avoid unregistering components that have been moved from one connector to another --- diff --git a/src/com/vaadin/terminal/gwt/client/ConnectorMap.java b/src/com/vaadin/terminal/gwt/client/ConnectorMap.java index 4f8b5701cf..6eb58940bf 100644 --- a/src/com/vaadin/terminal/gwt/client/ConnectorMap.java +++ b/src/com/vaadin/terminal/gwt/client/ConnectorMap.java @@ -194,7 +194,14 @@ public class ConnectorMap { if (connector instanceof ComponentContainerConnector) { for (ComponentConnector child : ((ComponentContainerConnector) connector) .getChildren()) { - unregisterConnector(child); + if (child.getParent() == connector) { + // Only unregister children that are actually connected to + // this parent. For instance when moving connectors from one + // layout to another and removing the first layout it will + // still contain references to its old children, which are + // now attached to another connector. + unregisterConnector(child); + } } } }