Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2013-11-18 19:44:55 -0500
committerSam Davis2013-11-18 19:45:08 -0500
commit9e71c029057b76f1cb3bfe1f687eeaf6cf729d78 (patch)
tree2c14cee59c9fccdf5c27622a2b82b11cc1a620f1
parent209fb867967e3733ff6e1cf93e119c6ca867b8fe (diff)
downloadorg.eclipse.mylyn.tasks-9e71c029057b76f1cb3bfe1f687eeaf6cf729d78.tar.gz
org.eclipse.mylyn.tasks-9e71c029057b76f1cb3bfe1f687eeaf6cf729d78.tar.xz
org.eclipse.mylyn.tasks-9e71c029057b76f1cb3bfe1f687eeaf6cf729d78.zip
NPE opening settings page when createSettingControls overridden
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
index 79dfc2f82..8346d71ce 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
@@ -334,13 +334,15 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
}
private void swapUserNameWithAnonymousInTabList() {
- List<Control> tabList = Arrays.asList(compositeContainer.getTabList());
- if (tabList.contains(repositoryUserNameEditor.getTextControl(compositeContainer))
- && tabList.contains(anonymousButton)) {
- int userNameIndex = tabList.indexOf(repositoryUserNameEditor.getTextControl(compositeContainer));
- int anonymousIndex = tabList.indexOf(anonymousButton);
- Collections.swap(tabList, userNameIndex, anonymousIndex);
- compositeContainer.setTabList(tabList.toArray(new Control[tabList.size()]));
+ if (compositeContainer != null && anonymousButton != null && repositoryUserNameEditor != null) {
+ List<Control> tabList = Arrays.asList(compositeContainer.getTabList());
+ if (tabList.contains(repositoryUserNameEditor.getTextControl(compositeContainer))
+ && tabList.contains(anonymousButton)) {
+ int userNameIndex = tabList.indexOf(repositoryUserNameEditor.getTextControl(compositeContainer));
+ int anonymousIndex = tabList.indexOf(anonymousButton);
+ Collections.swap(tabList, userNameIndex, anonymousIndex);
+ compositeContainer.setTabList(tabList.toArray(new Control[tabList.size()]));
+ }
}
}

Back to the top