Fix for NPE after disposing an experiment (Bug 381412)
authorBernd Hufmann <bhufmann@gmail.com>
Wed, 6 Jun 2012 21:47:57 +0000 (17:47 -0400)
committerBernd Hufmann <bhufmann@gmail.com>
Wed, 6 Jun 2012 21:47:57 +0000 (17:47 -0400)
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java

index 4cdbbc1889838d3d9e821a563078d92d11ecb8cb..d1bdf76ee158b8be02474daa83b61ff5c868cf32 100644 (file)
@@ -392,6 +392,12 @@ public class TmfExperiment<T extends ITmfEvent> extends TmfTrace<T> implements I
         if (!(context instanceof TmfExperimentContext)) {
             return null; // Throw an exception?
         }
+
+        // Make sure that we have something to read from
+        if (fTraces == null) {
+            return null;
+        }
+
         TmfExperimentContext expContext = (TmfExperimentContext) context;
 
         // If an event was consumed previously, first get the next one from that trace
This page took 0.036078 seconds and 5 git commands to generate.