Skip to content

Commit

Permalink
Context switch: fix NPE when markers are shown
Browse files Browse the repository at this point in the history
[fixed] NPE in Context switch view when markers are shown

Change-Id: I0aa2e2595aa18048cf413e72f7f420ab8a336c98
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/165021
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Reviewed-by: Christophe Bedard <bedard.christophe@gmail.com>
  • Loading branch information
MatthewKhouzam committed Jul 8, 2020
1 parent 91d5865 commit 03fe444
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -23,6 +23,7 @@
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.StateItem;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.MarkerEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.NullTimeEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeEvent;

Expand Down Expand Up @@ -84,6 +85,9 @@ private static State getEventState(TimeEvent event) {

@Override
public int getStateTableIndex(ITimeEvent event) {
if(event instanceof MarkerEvent) {
return TRANSPARENT;
}
ContextSwitchEntry entry = (ContextSwitchEntry) event.getEntry();
if (!entry.hasId()) {
return TRANSPARENT;
Expand Down

0 comments on commit 03fe444

Please sign in to comment.