summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDariusz Luksza2010-08-16 18:20:48 (EDT)
committer Dariusz Luksza2010-08-16 18:20:48 (EDT)
commit52ca15e5e8fbb40df3f875efd3f3642df0241584 (patch)
treefb875580d6af8ce8088b0c218e611e619a06c87c
parent6ef63719a7e8c53b7627da17248398226f158b77 (diff)
downloadegit-52ca15e5e8fbb40df3f875efd3f3642df0241584.zip
egit-52ca15e5e8fbb40df3f875efd3f3642df0241584.tar.gz
egit-52ca15e5e8fbb40df3f875efd3f3642df0241584.tar.bz2
Fix for NPE in GitModelSynchonize.launch()refs/changes/19/1319/1
Bug: 322852 Change-Id: I266f3689bf329cbdd86f24a9577759c3feb33452 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/GitModelSynchronize.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/GitModelSynchronize.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/GitModelSynchronize.java
index 212e677..7daa5a6 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/GitModelSynchronize.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/GitModelSynchronize.java
@@ -26,6 +26,7 @@ import org.eclipse.team.core.mapping.provider.SynchronizationContext;
import org.eclipse.team.core.subscribers.SubscriberScopeManager;
import org.eclipse.team.ui.TeamUI;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
+import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
@@ -72,7 +73,11 @@ public class GitModelSynchronize {
new ISynchronizeParticipant[] { participant });
IWorkbenchWindow window = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
- participant.run(window.getActivePage().getActivePart());
+ IWorkbenchPart activePart = null;
+ if (window != null)
+ activePart = window.getActivePage().getActivePart();
+
+ participant.run(activePart);
}
/**