summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-04-25 11:08:54 (EDT)
committerPascal Rapicault2013-04-25 11:08:54 (EDT)
commit5d347d9eccf664e51055d16e92b1537e668eebe3 (patch)
tree7c4c8dae191766557aae5f9d71a46febe198069d
parent96d7417ca3ca04c73de23289cccad9c8e9428365 (diff)
downloadrt.equinox.p2-5d347d9eccf664e51055d16e92b1537e668eebe3.zip
rt.equinox.p2-5d347d9eccf664e51055d16e92b1537e668eebe3.tar.gz
rt.equinox.p2-5d347d9eccf664e51055d16e92b1537e668eebe3.tar.bz2
Bug 406563 - NullPointerException at
AutomaticUpdater#getStatusLineManager() when there is no views/editors into the perspective
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
index 63d13d3..45f34dc 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
@@ -229,7 +229,13 @@ public class AutomaticUpdater implements IUpdateListener {
// can't blame us for trying.
}
- IWorkbenchPartSite site = activeWindow.getActivePage().getActivePart().getSite();
+ IWorkbenchPage page = activeWindow.getActivePage();
+ if (page == null)
+ return null;
+ IWorkbenchPart part = page.getActivePart();
+ if (part == null)
+ return null;
+ IWorkbenchPartSite site = part.getSite();
if (site instanceof IViewSite) {
statusLineManager = ((IViewSite) site).getActionBars().getStatusLineManager();
} else if (site instanceof IEditorSite) {