Fix NPE when indexer wasn't instantiated
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / trace / TmfExperiment.java
index 4b23e55eb2b11e608d87c976a0619f954212c709..ef74f27b99c3f7c26b1c238f06482b281005e425 100644 (file)
@@ -131,8 +131,10 @@ public class TmfExperiment<T extends ITmfEvent> extends TmfTrace<T> implements I
             fCurrentExperiment = null;
         }
 
-        // Clean up the index
-        getIndexer().dispose();
+        // Clean up the index if applicable
+        if (getIndexer() != null) {
+            getIndexer().dispose();
+        }
 
         if (fTraces != null) {
             for (final ITmfTrace trace : fTraces)
This page took 0.023933 seconds and 5 git commands to generate.