From 872e1f3b14e08198545e0de9a5b2bc226f0611df Mon Sep 17 00:00:00 2001 From: Richard Kirian Date: Fri, 12 Aug 2011 10:37:39 -0700 Subject: pattern_sim.c: check for NULL pointer --- src/pattern_sim.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/pattern_sim.c b/src/pattern_sim.c index 0c35cc89..bad74615 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -416,6 +416,10 @@ int main(int argc, char *argv[]) RefList *reflections; reflections = read_reflections(intfile); + if (reflections == NULL) { + ERROR("Problem reading input file %s\n",intfile); + return 1; + } free(intfile); if ( grad == GRADIENT_PHASED ) { -- cgit v1.2.3