Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2015-02-02 16:13:28 -0500
committerSam Davis2015-02-02 16:14:05 -0500
commit6f6d63ba45770fb54144b0b57a4109ab8158883c (patch)
tree9e380c42084fae01ac4e34e13089e0f7ca220efa /org.eclipse.mylyn.reviews.ui/src
parent4ab7fadababc2df5084a9a9966c6b6ee91432c68 (diff)
downloadorg.eclipse.mylyn.reviews-6f6d63ba45770fb54144b0b57a4109ab8158883c.tar.gz
org.eclipse.mylyn.reviews-6f6d63ba45770fb54144b0b57a4109ab8158883c.tar.xz
org.eclipse.mylyn.reviews-6f6d63ba45770fb54144b0b57a4109ab8158883c.zip
add null check on activeWorkbenchWindow
Diffstat (limited to 'org.eclipse.mylyn.reviews.ui/src')
-rw-r--r--org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ActiveReviewManager.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ActiveReviewManager.java b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ActiveReviewManager.java
index e5d06860..a1d1bb76 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ActiveReviewManager.java
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ActiveReviewManager.java
@@ -109,9 +109,12 @@ public class ActiveReviewManager {
};
public ActiveReviewManager() {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPageListener(pageListener);
PlatformUI.getWorkbench().addWindowListener(windowListener);
- windowListener.windowActivated(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (activeWorkbenchWindow != null) {
+ activeWorkbenchWindow.addPageListener(pageListener);
+ windowListener.windowActivated(activeWorkbenchWindow);
+ }
}
public void setReview(IReview review) {

Back to the top