aboutsummaryrefslogtreecommitdiff
path: root/src/partialator.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-24 11:41:01 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:30 +0100
commit4a15541c3875cb4dca578fb2d7d253c34491be4e (patch)
tree69b96bc98b1dda309fda46511521c053d4303ea1 /src/partialator.c
parentaefce4a667158901f9d6a83449dd32efd517b802 (diff)
Don't free non-existent reference list
Diffstat (limited to 'src/partialator.c')
-rw-r--r--src/partialator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/partialator.c b/src/partialator.c
index a2e802d2..9418bbb1 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -465,8 +465,10 @@ int main(int argc, char *argv[])
free_detector_geometry(det);
free(beam);
free(cref);
- free(reference);
- reflist_free(reference_list);
+ if ( reference != NULL ) {
+ free(reference);
+ reflist_free(reference_list);
+ }
for ( i=0; i<n_usable_patterns; i++ ) {
cell_free(images[i].indexed_cell);
free(images[i].filename);