aboutsummaryrefslogtreecommitdiff
path: root/src/render_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-06-24 16:48:45 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:51 +0100
commitac2386887faa1c88fe515841c92eac0bf20f4d19 (patch)
tree416aae42f322da3b28af910602ab8c09d5d84c07 /src/render_hkl.c
parente2a154ddefd961a79437cdac79fb5e46cda4a855 (diff)
render_hkl: Check cell parameters could be retrieved
Diffstat (limited to 'src/render_hkl.c')
-rw-r--r--src/render_hkl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/render_hkl.c b/src/render_hkl.c
index e1498b6c..1fd3ec24 100644
--- a/src/render_hkl.c
+++ b/src/render_hkl.c
@@ -78,9 +78,12 @@ static void render_za(UnitCell *cell, double *ref, unsigned int *c)
max_res = 0.0;
/* Work out reciprocal lattice spacings and angles for this cut */
- cell_get_reciprocal(cell, &asx, &asy, &asz,
+ if ( cell_get_reciprocal(cell, &asx, &asy, &asz,
&bsx, &bsy, &bsz,
- &csx, &csy, &csz);
+ &csx, &csy, &csz) ) {
+ ERROR("Couldn't get reciprocal parameters\n");
+ return;
+ }
theta = angle_between(asx, asy, asz, bsx, bsy, bsz);
as = modulus(asx, asy, asz) / 1e9;
bs = modulus(bsx, bsy, bsz) / 1e9;