diff options
author | Thomas White <taw@physics.org> | 2020-07-02 11:18:17 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:44 +0200 |
commit | ebc0145ddeefc197b6decc53dcfc892a959bb45e (patch) | |
tree | d767387164ab02003d7acb68e128761f2a406a99 | |
parent | 1533666f82d54be359fbb5df3036dd725a348cb0 (diff) |
Avoid segfault if there are no panels in DataTemplate
Obviously, this should never happen.
-rw-r--r-- | libcrystfel/src/image-hdf5.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c index 30bb1939..d60d4d47 100644 --- a/libcrystfel/src/image-hdf5.c +++ b/libcrystfel/src/image-hdf5.c @@ -1498,6 +1498,8 @@ char **image_hdf5_expand_frames(const DataTemplate *dtempl, int dims_expected; struct ev_list full_evs; + if ( dtempl->n_panels == 0 ) return NULL; + full_evs.events = NULL; full_evs.n_events = 0; full_evs.max_events = 0; |