summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur <artur@vaadin.com>2017-03-13 08:29:26 +0200
committerPekka Hyvönen <pekka@vaadin.com>2017-03-13 08:29:26 +0200
commitbec7308ca3f71122d62f743ba7ac376a66b1b6b2 (patch)
treeeb3ac74c2a6df5ce8a5b6bd012ad4604b249d060 /client
parent8106cf6456ea110304bc74a64ad27973ff63d94d (diff)
downloadvaadin-framework-bec7308ca3f71122d62f743ba7ac376a66b1b6b2.tar.gz
vaadin-framework-bec7308ca3f71122d62f743ba7ac376a66b1b6b2.zip
Fix detach of grid when it contains frozen columns (#8803)
* Fix detach of grid when it contains frozen columns Fixes #8748
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java
index 1b2574f4a8..d619b50b5d 100644
--- a/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java
@@ -140,8 +140,12 @@ public class ColumnConnector extends AbstractExtensionConnector {
@Override
public void onUnregister() {
super.onUnregister();
-
- parent.removeColumn(column);
+ if (parent.getParent() != null) {
+ // If the grid itself was unregistered there is no point in spending
+ // time to remove columns (and have problems with frozen columns)
+ // before throwing everything away
+ parent.removeColumn(column);
+ }
column = null;
}