Commit 872e1f3b authored by Richard Kirian's avatar Richard Kirian Committed by Thomas White
Browse files

pattern_sim.c: check for NULL pointer

parent c2efb3c5
...@@ -416,6 +416,10 @@ int main(int argc, char *argv[]) ...@@ -416,6 +416,10 @@ int main(int argc, char *argv[])
RefList *reflections; RefList *reflections;
reflections = read_reflections(intfile); reflections = read_reflections(intfile);
if (reflections == NULL) {
ERROR("Problem reading input file %s\n",intfile);
return 1;
}
free(intfile); free(intfile);
if ( grad == GRADIENT_PHASED ) { if ( grad == GRADIENT_PHASED ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment