aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Hufmann2012-06-06 17:47:57 (EDT)
committerFrancois Chouinard2012-06-07 15:30:31 (EDT)
commit099337607d6d333aa7d2e41d178e8aa41dd1bae1 (patch)
tree47d10aa17c3c1def1a7855f72ea1aa2fb8022a6b
parentfb36d4b4b4262d9838aa95b3273ecf2bb6779bb4 (diff)
downloadorg.eclipse.linuxtools-099337607d6d333aa7d2e41d178e8aa41dd1bae1.zip
org.eclipse.linuxtools-099337607d6d333aa7d2e41d178e8aa41dd1bae1.tar.gz
org.eclipse.linuxtools-099337607d6d333aa7d2e41d178e8aa41dd1bae1.tar.bz2
Fix for NPE after disposing an experiment (Bug 381412)
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java
index 4cdbbc1..d1bdf76 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java
@@ -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