aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kirian <rkirian@asu.edu>2011-08-12 10:37:39 -0700
committerThomas White <taw@physics.org>2012-02-22 15:27:36 +0100
commit872e1f3b14e08198545e0de9a5b2bc226f0611df (patch)
tree1bb06dc648cf57a83335a93ab559f1f100bb6a81
parentc2efb3c5a24b3cf5f574a5b1d13b6e715ffc4bf4 (diff)
pattern_sim.c: check for NULL pointer
-rw-r--r--src/pattern_sim.c4
1 files changed, 4 insertions, 0 deletions
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 ) {