summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2018-06-17 09:00:31 -0400
committerFrank Becker2018-06-18 14:56:52 -0400
commit9a7b4807f5dc6062d1834e763943cd09ef24d77e (patch)
treee45d1fa3fe142bc2f127b8134e3a2d4b3a9065aa
parent312f9cbad2b82bd71a50b58ed8587df2a6254045 (diff)
downloadorg.eclipse.mylyn.tasks-9a7b4807f5dc6062d1834e763943cd09ef24d77e.zip
org.eclipse.mylyn.tasks-9a7b4807f5dc6062d1834e763943cd09ef24d77e.tar.gz
org.eclipse.mylyn.tasks-9a7b4807f5dc6062d1834e763943cd09ef24d77e.tar.xz
515992: NullPointerException in ProjectTaskRepositoryPage.createContents
Change-Id: I56fa418a0ef1145aab54845407c8723f61f019f8 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=515992
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java
index 8ef28d2..99955fd 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java
@@ -163,6 +163,10 @@ public class ProjectTaskRepositoryPage extends PropertyPage {
private void initialize() {
project = (IProject) getElement().getAdapter(IResource.class);
+ if (project == null) {
+ throw new RuntimeException(
+ TasksUiPlugin.ID_PLUGIN + ": Can not get the project of " + getElement()); //$NON-NLS-1$
+ }
noDefaultAndApplyButton();
setDescription(Messages.ProjectTaskRepositoryPage_Select_a_task_repository_to_associate_with_this_project_below);
}