diff options
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/divelist.c b/divelist.c index 5ccc4face..882ba3bc6 100644 --- a/divelist.c +++ b/divelist.c @@ -2353,7 +2353,7 @@ static void popup_divelist_menu(GtkTreeView *tree_view, GtkTreeModel *model, int int idx, previdx, nextidx; struct dive *dive; - if (!gtk_tree_view_get_path_at_pos(tree_view, event->x, event->y, &path, NULL, NULL, NULL)) + if (!event || !gtk_tree_view_get_path_at_pos(tree_view, event->x, event->y, &path, NULL, NULL, NULL)) return; gtk_tree_model_get_iter(MODEL(dive_list), &iter, path); gtk_tree_model_get(MODEL(dive_list), &iter, DIVE_INDEX, &idx, -1); |