Skip to content

Commit

Permalink
Fix segfault on no output path
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcosmonaut committed Oct 25, 2024
1 parent 973446f commit 934c9a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ int main(int argc, char *argv[])
print_help();
return 1;
}
if (!outputFilename) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s: missing output path", argv[0]);
print_help();
return 1;
}
fileData = SDL_LoadFile(filename, &fileSize);
if (fileData == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Invalid file (%s)", SDL_GetError());
Expand Down

0 comments on commit 934c9a5

Please sign in to comment.