aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/image.c2
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));