summaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r--qt-ui/profilegraphics.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index f99fd4d2e..18e97da78 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -956,7 +956,7 @@ void ProfileGraphicsView::plot_one_event(struct event *ev)
{
int i;
struct plot_info *pi = &gc.pi;
- struct plot_data *entry;
+ struct plot_data *entry = NULL;
/* is plotting of this event disabled? */
if (ev->name) {
@@ -981,6 +981,10 @@ void ProfileGraphicsView::plot_one_event(struct event *ev)
break;
}
+ /* If we didn't find the right event, don't dereference null */
+ if (entry == NULL)
+ return;
+
/* draw a little triangular marker and attach tooltip */
int x = SCALEXGC(ev->time.seconds);