aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Hufmann2012-09-07 11:16:20 (EDT)
committerBernd Hufmann2012-09-07 14:16:28 (EDT)
commitc2a8785bc4141ed9d52dce019e409bb7aa44aec8 (patch)
treed66d4867379a49ff553bc37f2fea3045bcb4706a
parent3cfb6eceb590bb1a98c83c9476c9d75f4ed645b5 (diff)
downloadorg.eclipse.linuxtools-c2a8785bc4141ed9d52dce019e409bb7aa44aec8.zip
org.eclipse.linuxtools-c2a8785bc4141ed9d52dce019e409bb7aa44aec8.tar.gz
org.eclipse.linuxtools-c2a8785bc4141ed9d52dce019e409bb7aa44aec8.tar.bz2
Add null check of the current event in initTrace() (Bug 389064)
Change-Id: I7d3212370e46b481ae16660997b9fc6810e11c53 Signed-off-by: Bernd Hufmann <bhufmann@gmail.com> Reviewed-on: https://git.eclipse.org/r/7662 Tested-by: Hudson CI Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com> IP-Clean: Matthew Khouzam <matthew.khouzam@ericsson.com> Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java2
1 files changed, 1 insertions, 1 deletions
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 1fd7524..584e2c4 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
@@ -85,7 +85,7 @@ public class CtfTmfTrace extends TmfTrace<CtfTmfEvent> implements ITmfEventParse
/* Set the start and (current) end times for this trace */
ctx = new CtfTmfLightweightContext(this);
ctx.setLocation(new CtfLocation(0L));
- if(ctx.getLocation().equals(CtfIterator.NULL_LOCATION)) {
+ if((ctx.getLocation().equals(CtfIterator.NULL_LOCATION)) || (ctx.getCurrentEvent() == null)) {
/* Handle the case where the trace is empty */
this.setStartTime(TmfTimestamp.BIG_BANG);
} else {