aboutsummaryrefslogtreecommitdiff
path: root/src/crystfelimageview.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-03-16 14:14:20 +0100
committerThomas White <taw@physics.org>2021-03-16 14:14:20 +0100
commit818f70534a28c63ce86989b33b1a4f8a77395d06 (patch)
tree8fd3fa5fd74d539aacb425003f8dc4beb3128e49 /src/crystfelimageview.c
parentc509f53f96b9a1f9506369ee87a6b53045290604 (diff)
CrystFELImageView: Avoid crash when scrolling after image load failure
Diffstat (limited to 'src/crystfelimageview.c')
-rw-r--r--src/crystfelimageview.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crystfelimageview.c b/src/crystfelimageview.c
index d5c0b51f..6d6cbd60 100644
--- a/src/crystfelimageview.c
+++ b/src/crystfelimageview.c
@@ -133,6 +133,8 @@ static gint scroll_sig(GtkWidget *window, GdkEventScroll *event,
int claim = FALSE;
int zoom_allowed = 1;
+ if ( iv->image == NULL ) return FALSE;
+
if ( event->direction == GDK_SCROLL_UP ) {
zoom_scale = 1.1;
claim = TRUE;