Skip to content

Commit

Permalink
nicer check
Browse files Browse the repository at this point in the history
Co-authored-by: Akuli <[email protected]>
  • Loading branch information
littlewhitecloud and Akuli authored Dec 10, 2023
1 parent 8b80382 commit 822af4c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ static void write_gitinore(const char *p)
return;
}
FILE *gitinore = fopen(filename, "w");
fprintf(gitinore, "*");

fclose(gitinore);
if (gitinore != NULL) {
fprintf(gitinore, "*");
fclose(gitinore);
}
free(filename);
}

Expand Down

0 comments on commit 822af4c

Please sign in to comment.