aboutsummaryrefslogtreecommitdiff
path: root/src/crystfelimageview.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crystfelimageview.c')
-rw-r--r--src/crystfelimageview.c4
1 files changed, 3 insertions, 1 deletions
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; i<iv->num_peaklists; i++ ){
- if ( iv->peaklists[i] != NULL ) {
+ if ( (iv->peaklists[i] != NULL)
+ && (iv->image != NULL) )
+ {
draw_peaks(cr, iv , iv->peaklists[i]);
}
}