aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-11-30 10:43:37 +0100
committerThomas White <taw@physics.org>2020-11-30 11:04:09 +0100
commitd4a5907123f3fa4a401e6f45a68ee6885a1086c9 (patch)
tree92727a5903fa928966806438edacd2f0796be062
parentdaef3dd7c16bcb2dd98f9ae1acfdcd07db520401 (diff)
Avoid crash when image info button is clicked on an empty image view
-rw-r--r--src/crystfel_gui.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index e7baacdc..8ceef8fb 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -664,6 +664,8 @@ static gint image_info_clicked_sig(GtkWidget *widget,
GtkWidget *label;
char tmp[64];
+ if ( proj->cur_image == NULL ) return FALSE;
+
popover = gtk_popover_new(widget);
gtk_popover_set_position(GTK_POPOVER(popover),
GTK_POS_BOTTOM);