diff options
-rw-r--r-- | src/diffraction-gpu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/diffraction-gpu.c b/src/diffraction-gpu.c index bd9f7baa..dc3bfcad 100644 --- a/src/diffraction-gpu.c +++ b/src/diffraction-gpu.c @@ -65,6 +65,11 @@ void get_diffraction_gpu(struct gpu_context *gctx, struct image *image, const int sampling = SAMPLING; cl_float bwstep; + if ( gctx == NULL ) { + ERROR("GPU setup failed.\n"); + return; + } + cell_get_cartesian(image->molecule->cell, &ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz); |