summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur <artur@vaadin.com>2017-03-13 08:29:26 +0200
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-03-16 16:21:24 +0200
commit20e775863199f38270ee3abc28246ac00391d272 (patch)
tree39377fe69684ae213c6f36987f37e758f5e20bd3 /client
parent607e52ddfb1eceb634d711872f68bf56a3e496a4 (diff)
downloadvaadin-framework-20e775863199f38270ee3abc28246ac00391d272.tar.gz
vaadin-framework-20e775863199f38270ee3abc28246ac00391d272.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;
}