Permalink
Browse files

Added check if control is disposed before tyring to call redraw.

Fixed exception when control is disposed.
  • Loading branch information...
Arvid Berg
Arvid Berg committed Jul 2, 2010
1 parent f79125b commit 5af6b90a4f96506191a1c56fcf1ccd7a9913b3b0
@@ -48,6 +48,7 @@
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.viewers.ILazyContentProvider;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
/**
@@ -214,7 +215,8 @@ private NatTable getCompositeTable(Viewer viewer) {
}
private void updateSize(int size) {
- getCompositeTable( viewer ).redraw();
+ Control control = getCompositeTable( viewer );
+ if(!control.isDisposed()) control.redraw();
}

0 comments on commit 5af6b90

Please sign in to comment.