Skip to content

Commit

Permalink
EnableBreakpointsAction.asynchUpdate: fix NPE eclipse-platform#874
Browse files Browse the repository at this point in the history
  • Loading branch information
EcljpseB0T authored and jukzi committed Nov 30, 2023
1 parent cb993ac commit 508558d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;

Expand Down Expand Up @@ -243,7 +244,11 @@ protected void asynchUpdate() {
return;
}
Runnable r = () -> {
IWorkbenchWindow ww = getView().getViewSite().getPage().getWorkbenchWindow();
IWorkbenchPage page = getView().getViewSite().getPage();
if (page == null) {
return;
}
IWorkbenchWindow ww = page.getWorkbenchWindow();
if (ww == null) {
return;
}
Expand Down

0 comments on commit 508558d

Please sign in to comment.