From b1cb4ee55dc493808b8408ada63c5c59a301399e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 1 Jul 2020 11:56:21 +0200 Subject: Don't try to draw peaks without an image structure --- src/crystfelimageview.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/crystfelimageview.c b/src/crystfelimageview.c index 36989ce4..cde4459c 100644 --- a/src/crystfelimageview.c +++ b/src/crystfelimageview.c @@ -445,7 +445,9 @@ static gint draw_sig(GtkWidget *window, cairo_t *cr, CrystFELImageView *iv) } for ( i=0; inum_peaklists; i++ ){ - if ( iv->peaklists[i] != NULL ) { + if ( (iv->peaklists[i] != NULL) + && (iv->image != NULL) ) + { draw_peaks(cr, iv , iv->peaklists[i]); } } -- cgit v1.2.3