Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2011-11-10 11:13:32 -0500
committerUwe Stieber2011-11-10 11:13:32 -0500
commitd5c04ff2fc43c1deca6263082c2d41c1d20d000e (patch)
treee82278d888af419ae9d9ab754df0ecb185ab5b14
parent28d54f63a4c6c16dc256b9126922064c5866ac60 (diff)
downloadorg.eclipse.tcf-d5c04ff2fc43c1deca6263082c2d41c1d20d000e.tar.gz
org.eclipse.tcf-d5c04ff2fc43c1deca6263082c2d41c1d20d000e.tar.xz
org.eclipse.tcf-d5c04ff2fc43c1deca6263082c2d41c1d20d000e.zip
Target Explorer: Fix NPE on opening a new Workbench Window
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsContentProvider.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsContentProvider.java b/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsContentProvider.java
index fa7d4a658..2fdf7437e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsContentProvider.java
@@ -109,7 +109,7 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
public void restoreState(IMemento memento) {
// We can call the local working set manager restoreState(memento) method
// only as long the working set manager is empty
- if (localWorkingSetManager.getWorkingSets().length == 0) {
+ if (memento != null && localWorkingSetManager.getWorkingSets().length == 0) {
localWorkingSetManager.restoreState(memento);
IWorkingSet old = localWorkingSetManager.getWorkingSet("Others"); //$NON-NLS-1$
@@ -136,7 +136,7 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
*/
@Override
public void saveState(IMemento memento) {
- localWorkingSetManager.saveState(memento);
+ if (memento != null) localWorkingSetManager.saveState(memento);
}
/* (non-Javadoc)

Back to the top