tmf: verify that resource is not null in import operation
authorBernd Hufmann <Bernd.Hufmann@ericsson.com>
Tue, 3 May 2016 13:48:16 +0000 (09:48 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Wed, 4 May 2016 23:36:27 +0000 (19:36 -0400)
Change-Id: Id73e76b550b5ee1767007e618fecbaa9154842de
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/71907
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/TraceValidateAndImportOperation.java

index 52773279147f314a3ac163066fe998eb3d8bef84..22e476cb1c11709c39335cfc0394f79a8f203cd3 100644 (file)
@@ -618,7 +618,7 @@ public class TraceValidateAndImportOperation implements IRunnableWithProgress {
         operation.run(SubMonitor.convert(monitor).newChild(1));
         String sourceLocation = fileSystemElement.getSourceLocation();
         IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(tracePath);
-        if (sourceLocation != null) {
+        if ((sourceLocation != null) && (resource != null)) {
             resource.setPersistentProperty(TmfCommonConstants.SOURCE_LOCATION, sourceLocation);
         }
 
This page took 0.026788 seconds and 5 git commands to generate.