aboutsummaryrefslogtreecommitdiff
path: root/src/crystfelimageview.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-07-01 11:56:21 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:44 +0200
commitb1cb4ee55dc493808b8408ada63c5c59a301399e (patch)
treef32f025934d72b08e2bd996831aaf1f9a7660939 /src/crystfelimageview.c
parent565268d27911fcdda767f483df461eead1b917d9 (diff)
Don't try to draw peaks without an image structure
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]);
}
}