diff options
author | Thomas White <taw@physics.org> | 2021-05-07 14:57:08 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-05-07 14:57:08 +0200 |
commit | 949b13b3b10a4e4f64a7ebeb6bd7e57ddeed0a11 (patch) | |
tree | 13cd703521b34a7e0b1be0377010926faf7f7c47 | |
parent | 05dacf8af84b6f2e962535e21de09b68693bffeb (diff) |
MsgPack: Warn if dtempl->peak_list is NULL
-rw-r--r-- | libcrystfel/src/image-msgpack.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcrystfel/src/image-msgpack.c b/libcrystfel/src/image-msgpack.c index 827b7724..38bafb0a 100644 --- a/libcrystfel/src/image-msgpack.c +++ b/libcrystfel/src/image-msgpack.c @@ -150,6 +150,11 @@ ImageFeatureList *image_msgpack_read_peaks(const DataTemplate *dtempl, return NULL; } + if ( dtempl->peak_list == NULL ) { + ERROR("You must set 'peak_list' in the geometry file.\n"); + return NULL; + } + msgpack_unpacked_init(&unpacked); r = msgpack_unpack_next(&unpacked, data_block, data_block_size, NULL); if ( r != MSGPACK_UNPACK_SUCCESS ) { |