aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-29 11:06:44 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:28 +0100
commite90638ca88058ed0d61b995ec3ca482f29be6e0f (patch)
tree7fbba83facc3ba8235cda5385e15de7b21805816
parent4d72947ddfbe00c6a618c370c8458c605221701b (diff)
Don't attempt to write camera length if detector geometry is not present
-rw-r--r--src/stream.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stream.c b/src/stream.c
index 54c31050..87c11bf8 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -253,7 +253,9 @@ void write_chunk(FILE *ofh, struct image *i, int f)
//FIXME:we're writing camera length from first panel only.
//this should actually write camera length for all panels.
- fprintf(ofh, "camera_length = %f\n",i->det->panels[0].clen);
+ if ( i->det != NULL ) {
+ fprintf(ofh, "camera_length = %f\n", i->det->panels[0].clen);
+ }
if ( (f & STREAM_PEAKS)
|| ((f & STREAM_PEAKS_IF_INDEXED) && (i->indexed_cell != NULL))