Issue #345 allow double dispose of GLTarget
Change-Id: Ib433557f82bc0bc63fb537814bad47eab00be2be Former-commit-id:b776d953d7
[formerly06c9d4cdcf
] [formerly55aa66a510
[formerly 8b906b245fd927ed79825b00dfba456a1c327fbb]] Former-commit-id:55aa66a510
Former-commit-id:5d6b036ed7
This commit is contained in:
parent
2ee4305d77
commit
c3d3142bab
1 changed files with 5 additions and 2 deletions
|
@ -559,17 +559,20 @@ public class GLTarget implements IGLTarget {
|
|||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
theContext.makeContextCurrent();
|
||||
|
||||
if (defaultFont != null) {
|
||||
defaultFont.disposeInternal();
|
||||
defaultFont = null;
|
||||
}
|
||||
if (colorbarFont != null) {
|
||||
colorbarFont.disposeInternal();
|
||||
colorbarFont = null;
|
||||
}
|
||||
|
||||
theContext.releaseContext();
|
||||
theContext.destroyContext();
|
||||
|
||||
if (theCanvas != null && theCanvas.isDisposed() == false) {
|
||||
|
||||
theCanvas.removeListener(SWT.Resize, this.canvasResizeListener);
|
||||
}
|
||||
lastColormapUsed = null;
|
||||
|
|
Loading…
Add table
Reference in a new issue