tmf: Bug 495219: Fix NPE in checkpoint indexer seeking on disposed trace
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / trace / indexer / checkpoint / TmfCheckpointIndexer.java
index 8e806307f16a6f4a2e8efe968972259ad5f5d03a..355f67e04125323f5b4f9be867174b42dcaba7ce 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson
+ * Copyright (c) 2012, 2016 Ericsson
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -323,6 +323,9 @@ public class TmfCheckpointIndexer implements ITmfTraceIndexer {
                 }
                 ITmfCheckpoint checkpoint = fTraceIndex.get(index);
                 TmfCoreTracer.traceIndexer("Restored checkpoint: " + checkpoint); //$NON-NLS-1$
+                if (checkpoint == null) {
+                    return fTrace.seekEvent((ITmfLocation) null);
+                }
                 location = checkpoint.getLocation();
             }
         }
This page took 0.024883 seconds and 5 git commands to generate.