summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-22 20:44:27 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-22 20:44:27 -0800
commit714d5e244398d24eb76ba6660dcaf00e3b360750 (patch)
tree67e4f19de2bda95e3c6f3ff98db387155685ed21 /divelist.c
parent9e0a3168121be98a56fb35e632bea9a00bb9f768 (diff)
downloadsubsurface-714d5e244398d24eb76ba6660dcaf00e3b360750.tar.gz
Fix crash when clicking on icon column in trip header entries
Silly oversight. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c2
1 files changed, 1 insertions, 1 deletions
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);