diff options
author | Thomas White <taw@physics.org> | 2016-07-29 11:53:17 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2016-07-29 11:53:55 +0200 |
commit | 31f02efd79b8533639ee25698ee0e69e5020c768 (patch) | |
tree | 689ff87a780daa7f771c3c4b6b11e428ecdb2284 /libcrystfel/src | |
parent | b34ad381ebc6eece4d943ecbd56ace0df3089ba2 (diff) |
Set image->dp in hdf5_read()
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/hdf5-file.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index 70e8cafe..00ad5c45 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -1346,6 +1346,12 @@ int hdf5_read(struct hdfile *f, struct image *image, const char *element, ERROR("WARNING: hdf5_read() called with geometry structure.\n"); } image->det = simple_geometry(image, w, h); + image->dp = malloc(sizeof(double *)); + if ( image->dp == NULL ) { + ERROR("Failed to allocate memory for image data!\n"); + return 1; + } + image->dp[0] = buf; if ( satcorr ) debodge_saturation(f, image); |