aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2012-05-29 13:53:19 (EDT)
committerOleg Besedin2012-05-29 13:53:50 (EDT)
commitd5d5ec77ba7894e6749fabafdbb81fbcf9e89182 (patch)
tree7ecfe469ac2dd91b4fab7a0ded59d60a7fb378d4
parent6d51ea7da287d333a72a4068fbbf01d770e1083c (diff)
downloadeclipse.platform.ui-d5d5ec77ba7894e6749fabafdbb81fbcf9e89182.zip
eclipse.platform.ui-d5d5ec77ba7894e6749fabafdbb81fbcf9e89182.tar.gz
eclipse.platform.ui-d5d5ec77ba7894e6749fabafdbb81fbcf9e89182.tar.bz2
Bug 380654 - Launching an application with -persistState false causes av20120529-1753I20120529-1900
NPE
-rw-r--r--bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ResourceHandler.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ResourceHandler.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ResourceHandler.java
index e44044e..b794be7 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ResourceHandler.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ResourceHandler.java
@@ -203,6 +203,8 @@ public class ResourceHandler implements IModelResourceHandler {
if (resource == null) {
Resource applicationResource = loadResource(applicationDefinitionInstance);
MApplication theApp = (MApplication) applicationResource.getContents().get(0);
+ if (restoreLocation == null)
+ restoreLocation = URI.createFileURI(workbenchData.getAbsolutePath());
resource = resourceSetImpl.createResource(restoreLocation);
resource.getContents().add((EObject) theApp);
}