From: Patrick Tasse Date: Wed, 10 Sep 2014 21:07:52 +0000 (-0400) Subject: tmf: Fix NullPointerException drawing time graph arrows X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=a5e663123fe9faa75e5221935366e901ecac4159;p=deliverable%2Ftracecompass.git tmf: Fix NullPointerException drawing time graph arrows Change-Id: Ic3fd6c9646a4d6a62c6421ab5392fe0d4f4b152c Signed-off-by: Patrick Tasse Reviewed-on: https://git.eclipse.org/r/33213 Tested-by: Hudson CI Reviewed-by: Matthew Khouzam --- diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java index 7edbb2456a..d053ccc618 100644 --- a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java +++ b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java @@ -1641,6 +1641,9 @@ public class TimeGraphControl extends TimeGraphBaseControl protected boolean drawArrow(TimeGraphColorScheme colors, ITimeEvent event, Rectangle rect, GC gc) { + if (rect == null) { + return false; + } int colorIdx = fTimeGraphProvider.getStateTableIndex(event); if (colorIdx < 0) { return false;