diff options
author | Thomas White <taw@physics.org> | 2019-06-05 15:46:40 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-06-05 15:46:57 +0200 |
commit | 3b30c23fd955980a98992a3212d1f2e78144701c (patch) | |
tree | d0ad8c1ac3d3fedbc15ad5514a255b18c1d975cd /libcrystfel/src/image.c | |
parent | 48942c4eeb4f41d9b55efdb54fbacc2b28f4e22b (diff) |
Fix obvious bug in image_add_feature()
Introduced by aa1676f35317df92840b27ba78f13c13308bc7d4
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r-- | libcrystfel/src/image.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |