From 714d5e244398d24eb76ba6660dcaf00e3b360750 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 22 Jan 2013 20:44:27 -0800 Subject: Fix crash when clicking on icon column in trip header entries Silly oversight. Signed-off-by: Dirk Hohndel --- divelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'divelist.c') diff --git a/divelist.c b/divelist.c index b3c5417b8..be5cd68b7 100644 --- a/divelist.c +++ b/divelist.c @@ -1714,7 +1714,7 @@ gboolean icon_click_cb(GtkWidget *w, GdkEventButton *event, gpointer data) gtk_tree_model_get_iter(MODEL(dive_list), &iter, path); gtk_tree_model_get(MODEL(dive_list), &iter, DIVE_INDEX, &idx, -1); dive = get_dive(idx); - if (dive->latitude.udeg || dive->longitude.udeg) + if (dive && (dive->latitude.udeg || dive->longitude.udeg)) show_gps_location(dive); } gtk_tree_path_free(path); -- cgit v1.2.3-70-g09d2