Skip to content

Commit

Permalink
check if tfd actually returns a file
Browse files Browse the repository at this point in the history
  • Loading branch information
burhanr13 committed Dec 4, 2024
1 parent 3fd946d commit 4f31ffa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/emulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ int emulator_init(int argc, char** argv) {
ctremu.romfile = tinyfd_openFileDialog(
EMUNAME ": Open Game", NULL, sizeof filetypes / sizeof filetypes[0],
filetypes, "3DS Executables", false);
if (!ctremu.romfile) {
eprintf(usage);
return -1;
}
#else
eprintf(usage);
return -1;
Expand Down

0 comments on commit 4f31ffa

Please sign in to comment.