diff options
author | Thomas White <taw@physics.org> | 2010-02-22 17:44:46 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-02-22 17:44:46 +0100 |
commit | f92a84e3929ad775da64cab7ae1ca224b7d80358 (patch) | |
tree | 86659cc29312afbd27107dc2644ba72051f17b5e | |
parent | 32f52f0821802aecb1d00dd1054acf25325b8599 (diff) |
Don't try to calculate with a null GPU context
-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); |