diff options
author | Thomas White <taw@physics.org> | 2024-01-19 12:59:47 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2024-02-06 16:59:34 +0100 |
commit | fd363c300c1767681ac6b03f05132d9e6d8a6884 (patch) | |
tree | be6ce156bd9ca66a0682393675dd77c1a2ac18c3 /libcrystfel/src/image.c | |
parent | a40db3a0a67914934f214d5ea9473ad3465235b5 (diff) |
Fix incorrect uses of cell_free
This also gets rid of crystal_copy_deep. From now on, all crystal_copy
calls also copy the UnitCell.
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r-- | libcrystfel/src/image.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index 142598e3..3b4e04df 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -352,9 +352,7 @@ int remove_flagged_crystals(struct image *image) for ( i=0; i<image->n_crystals; i++ ) { if ( crystal_get_user_flag(image->crystals[i].cr) ) { int j; - Crystal *deleteme = image->crystals[i].cr; - cell_free(crystal_get_cell(deleteme)); - crystal_free(deleteme); + crystal_free(image->crystals[i].cr); reflist_free(image->crystals[i].refls); for ( j=i; j<image->n_crystals-1; j++ ) { image->crystals[j] = image->crystals[j+1]; @@ -375,8 +373,6 @@ void free_all_crystals(struct image *image) int i; if ( image->crystals == NULL ) return; for ( i=0; i<image->n_crystals; i++ ) { - Crystal *cr = image->crystals[i].cr; - cell_free(crystal_get_cell(cr)); crystal_free(image->crystals[i].cr); reflist_free(image->crystals[i].refls); } |