From 3b30c23fd955980a98992a3212d1f2e78144701c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 5 Jun 2019 15:46:40 +0200 Subject: Fix obvious bug in image_add_feature() Introduced by aa1676f35317df92840b27ba78f13c13308bc7d4 --- libcrystfel/src/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcrystfel/src/image.c') diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index e92f2f5e..c7069faa 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -64,7 +64,7 @@ void image_add_feature(ImageFeatureList *flist, double fs, double ss, struct panel *p, struct image *parent, double intensity, const char *name) { - if ( flist->features ) { + if ( flist->n_features == flist->max_features ) { struct imagefeature *nf; int nmf = flist->max_features + 128; nf = realloc(flist->features, nmf*sizeof(struct imagefeature)); -- cgit v1.2.3