diff options
-rw-r--r-- | src/fios.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fios.cpp b/src/fios.cpp index b2ed1ec50..ff7153af3 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -400,6 +400,10 @@ FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file, * .SS1 Transport Tycoon Deluxe preset game * .SV1 Transport Tycoon Deluxe (Patch) saved game * .SV2 Transport Tycoon Deluxe (Patch) saved 2-player game */ + + /* Don't crash if we supply no extension */ + if (ext == NULL) return FIOS_TYPE_INVALID; + if (strcasecmp(ext, ".sav") == 0) { GetFileTitle(file, title, last, SAVE_DIR); return FIOS_TYPE_FILE; |