diff options
author | Sam Davis | 2013-11-19 00:44:55 +0000 |
---|---|---|
committer | Sam Davis | 2013-11-19 00:45:08 +0000 |
commit | 9e71c029057b76f1cb3bfe1f687eeaf6cf729d78 (patch) | |
tree | 2c14cee59c9fccdf5c27622a2b82b11cc1a620f1 /org.eclipse.mylyn.tasks.ui | |
parent | 209fb867967e3733ff6e1cf93e119c6ca867b8fe (diff) | |
download | org.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
Change-Id: I65a0b57a9371be190d7d6ca785562e8ae579be5c
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r-- | org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java | 16 |
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()])); + } } } |