diff options
author | Thomas White <taw@physics.org> | 2020-05-18 11:38:02 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:42:57 +0200 |
commit | ccfe704df3d374c4e3a7a0c3944b9c3384e80e3e (patch) | |
tree | 34f14183806b0d32dadf8e90fe3667be9c325906 | |
parent | fe3263953cd65371062ce8fd382ee2257de977f2 (diff) |
Fix CXI peak loading in new API
-rw-r--r-- | libcrystfel/src/image.c | 10 |
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; } |