aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-09-12 11:01:13 +0200
committerThomas White <taw@physics.org>2014-09-12 11:02:00 +0200
commitcda71f65d55ad889066af0d4e2dff3f4035c019a (patch)
treeecee75d988d0f91f47a096b188a3072bd365f356 /src
parentbad93c437908f226ffda7ee4c1e4a79c828f3075 (diff)
process_hkl: Fix condition for histogramming
Diffstat (limited to 'src')
-rw-r--r--src/process_hkl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/process_hkl.c b/src/process_hkl.c
index cd8640a9..b6a2d8cb 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -664,9 +664,11 @@ int main(int argc, char *argv[])
reference = model;
model = reflist_new();
- free(hist_vals);
- hist_vals = malloc(1*sizeof(double));
- hist_i = 0;
+ if ( hist_vals != NULL ) {
+ free(hist_vals);
+ hist_vals = malloc(1*sizeof(double));
+ hist_i = 0;
+ }
r = merge_all(st, model, reference, sym,
&hist_vals, hist_h, hist_k, hist_l, &hist_i,