From c26afeaf62258ccaf63d60de41d86a36f9f34800 Mon Sep 17 00:00:00 2001 From: Mathieu Denis Date: Mon, 14 May 2012 16:03:28 -0400 Subject: [PATCH] Fixed lost event bug. Signed-off-by: Matthew Khouzam --- .../linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java index 537dca448e..dd627fa018 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java @@ -146,7 +146,7 @@ public final class CtfTmfEvent implements ITmfEvent { * Inner constructor to create "null" events. Don't use this directly in * normal usage, use CtfTmfEvent.getNullEvent() to get an instance of an * empty event. - * + * * This needs to be public however because it's used in extension points, * and the framework will use this constructor to get the class type. */ @@ -280,7 +280,11 @@ public final class CtfTmfEvent implements ITmfEvent { */ @Override public ITmfEventType getType() { - return CtfTmfEventType.get(eventName); + CtfTmfEventType ctfTmfEventType = CtfTmfEventType.get(eventName); + if( ctfTmfEventType == null ){ + ctfTmfEventType = new CtfTmfEventType( this.getEventName(), this.getContent()); + } + return ctfTmfEventType; } /** -- 2.34.1