Merge "Issue #1240 check for null when removing D2DNsharp part listener" into development
Former-commit-id:fb4821f2ef
[formerlyd5b46f2366
] [formerlyfb4821f2ef
[formerlyd5b46f2366
] [formerlyce262db463
[formerly bdf886c16679a8049b91fb8323e723ccc098f83b]]] Former-commit-id:ce262db463
Former-commit-id:4b9379214e
[formerlyfa7b82253e
] Former-commit-id:bc5e894921
This commit is contained in:
commit
1b999aa95e
1 changed files with 9 additions and 3 deletions
|
@ -29,6 +29,7 @@ import org.eclipse.ui.IViewReference;
|
|||
import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
import org.eclipse.ui.IWorkbenchPartReference;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.PartInitException;
|
||||
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -90,9 +91,14 @@ public class D2DNSharpPartListener implements IPartListener2 {
|
|||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
VizWorkbenchManager.getInstance().getCurrentWindow()
|
||||
.getActivePage()
|
||||
.removePartListener(D2DNSharpPartListener.this);
|
||||
IWorkbenchWindow window = VizWorkbenchManager.getInstance()
|
||||
.getCurrentWindow();
|
||||
if (window == null) {
|
||||
// window will be null when CAVE is shutting down
|
||||
return;
|
||||
}
|
||||
IWorkbenchPage page = window.getActivePage();
|
||||
page.removePartListener(D2DNSharpPartListener.this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue