mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 04:55:22 +02:00
null pointer check for active window
This commit is contained in:
parent
d16a66b514
commit
04697ae05c
1 changed files with 12 additions and 1 deletions
|
@ -964,8 +964,19 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
if (activePage == null)
|
if (activePage == null)
|
||||||
{
|
{
|
||||||
IWorkbenchWindow activeWindow = wb.getActiveWorkbenchWindow();
|
IWorkbenchWindow activeWindow = wb.getActiveWorkbenchWindow();
|
||||||
|
if (activeWindow == null)
|
||||||
|
{
|
||||||
activePage = activeWindow.getActivePage();
|
activePage = activeWindow.getActivePage();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IWorkbenchWindow[] windows = wb.getWorkbenchWindows();
|
||||||
|
if (windows != null && windows.length > 0)
|
||||||
|
{
|
||||||
|
activePage = windows[0].getActivePage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IEditorReference[] activeReferences = activePage.getEditorReferences();
|
IEditorReference[] activeReferences = activePage.getEditorReferences();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue