aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-10 14:33:37 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:24 +0200
commit0f75b99090295cdec9f8a5318c915010b3a24336 (patch)
treefbb61f43c6cc87f31c9cbac762722dcb38c529cb
parenta7057533b2d8dbccb2e29d7215a054e368d0b749 (diff)
Don't update peaks if no image is loaded
-rw-r--r--src/crystfel_gui.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index aba46e9a..f5009d01 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -139,6 +139,7 @@ static void update_peaks(struct crystfelproject *proj)
if ( proj->n_frames == 0 ) return;
image = crystfel_image_view_get_image_struct(CRYSTFEL_IMAGE_VIEW(proj->imageview));
+ if ( image == NULL ) return;
search_peaks(image, proj->peak_search_params.threshold,
proj->peak_search_params.min_sq_gradient,