From d5e10b751ce5032af1de0768e162f62800248ae2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 3 Mar 2010 16:33:26 +0100 Subject: Don't crash if a peak can't be mapped --- src/detector.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/detector.c b/src/detector.c index 92094639..6a6b260e 100644 --- a/src/detector.c +++ b/src/detector.c @@ -34,6 +34,7 @@ int map_position(struct image *image, double dx, double dy, double y = 0.0; p = find_panel(&image->det, dx, dy); + if ( p == NULL ) return 1; x = ((double)dx - p->cx); y = ((double)dy - p->cy); -- cgit v1.2.3