Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2013-12-17 03:59:57 -0500
committerVincent Lorenzo2013-12-17 03:59:57 -0500
commit89d4c3236b5d934b849a606a0e3490b019b83094 (patch)
tree0d3c264101a5e2391d88c5566af66c25e86985ed /extraplugins
parente655f1d543801b9ab730c85dd89445e0fd7eddf3 (diff)
downloadorg.eclipse.papyrus-89d4c3236b5d934b849a606a0e3490b019b83094.tar.gz
org.eclipse.papyrus-89d4c3236b5d934b849a606a0e3490b019b83094.tar.xz
org.eclipse.papyrus-89d4c3236b5d934b849a606a0e3490b019b83094.zip
Fix dispose errors on table
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java12
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java8
2 files changed, 15 insertions, 5 deletions
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
index 4f6c12f5112..80fff0b58b9 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
@@ -422,9 +422,15 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
@Override
public void dispose() {
- this.bodyDataProvider.dispose();
- this.rowHeaderDataProvider.dispose();
- this.columnHeaderDataProvider.dispose();
+ if(this.bodyDataProvider != null) {
+ this.bodyDataProvider.dispose();
+ }
+ if(this.rowHeaderDataProvider != null) {
+ this.rowHeaderDataProvider.dispose();
+ }
+ if(this.columnHeaderDataProvider != null) {
+ this.columnHeaderDataProvider.dispose();
+ }
this.tableContext = null;
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
index 7fd56632a9f..d3b387a026c 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
@@ -502,8 +502,12 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
@Override
public void dispose() {
if(this.tableEditingDomain != null && this.contextEditingDomain != null) {
- this.tableEditingDomain.getCommandStack().removeCommandStackListener(this.refreshListener);
- this.contextEditingDomain.getCommandStack().removeCommandStackListener(this.refreshListener);
+ if(this.tableEditingDomain.getCommandStack() != null) {
+ this.tableEditingDomain.getCommandStack().removeCommandStackListener(this.refreshListener);
+ }
+ if(this.contextEditingDomain.getCommandStack() != null) {
+ this.contextEditingDomain.getCommandStack().removeCommandStackListener(this.refreshListener);
+ }
this.columnManager.dispose();
this.rowManager.dispose();
Table table = getTable();

Back to the top