aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-05-18 11:38:02 +0200
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commitccfe704df3d374c4e3a7a0c3944b9c3384e80e3e (patch)
tree34f14183806b0d32dadf8e90fe3667be9c325906
parentfe3263953cd65371062ce8fd382ee2257de977f2 (diff)
Fix CXI peak loading in new API
-rw-r--r--libcrystfel/src/image.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index 85f41467..1262aa12 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -2315,11 +2315,17 @@ ImageFeatureList *get_peaks_cxi_dtempl(const DataTemplate *dtempl,
return NULL;
}
+ if ( ev->dim_entries == NULL ) {
+ ERROR("CXI format peak list format selected,"
+ "but file has no event structure");
+ return NULL;
+ }
+ line = ev->dim_entries[0];
+
subst_name = retrieve_full_path(ev, dtempl->peak_list);
free_event(ev);
if ( subst_name == NULL ) {
ERROR("Invalid peak path %s\n", subst_name);
- free_event(ev);
H5Fclose(fh);
return NULL;
}
@@ -2374,7 +2380,7 @@ ImageFeatureList *get_peaks_cxi_dtempl(const DataTemplate *dtempl,
}
- return NULL;
+ return features;
}