Skip to content

Commit

Permalink
In case the file doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias committed Aug 9, 2019
1 parent 1efe6e0 commit b24147b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mad_elem.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ void set_aperture_element(struct element *el, struct command* def){
el->aper->apertype = custom;
int lines=0, ch;
FILE *fp = fopen(type,"r");
if(fp==NULL){
fatal_error("Aperture File is not existing ",type);
}

while(!feof(fp))
{
ch = fgetc(fp);
Expand Down

0 comments on commit b24147b

Please sign in to comment.