From 83f4b09dcf0748da1333659a72e832dffbed182c Mon Sep 17 00:00:00 2001 From: Matthew Khouzam Date: Tue, 12 Jun 2012 14:51:32 -0400 Subject: Fix for the fix: Fix an error if a user forcefully reads after the end of the trace. Signed-off-by: Matthew Khouzam --- .../src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lttng/org.eclipse.linuxtools.tmf.core') diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java index 76280d1f86..32980e2595 100644 --- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java +++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java @@ -243,13 +243,10 @@ public class CtfTmfTrace extends TmfTrace implements ITmfEventParse public synchronized CtfTmfEvent getNext(final ITmfContext context) { CtfTmfEvent event = null; if (context instanceof CtfTmfLightweightContext) { - if (CtfLocation.INVALID_LOCATION.equals(context.getLocation())) { + if (CtfLocation.INVALID_LOCATION.equals(context.getLocation().getLocation())) { return null; } CtfTmfLightweightContext ctfContext = (CtfTmfLightweightContext) context; - if( ctfContext.getLocation().equals(CtfLocation.INVALID_LOCATION)) { - return null; - } event = ctfContext.getCurrentEvent(); if (event != null) { -- cgit v1.2.3