From: Holger Schemel Date: Sat, 3 Jul 2021 11:31:08 +0000 (+0200) Subject: added check if loading tape file fails when auto-processing tapes X-Git-Tag: 4.3.0.0~112 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=42dc71e8fa13849b92d9a9dac58e9e4c3e4c8fcb added check if loading tape file fails when auto-processing tapes --- diff --git a/src/tape.c b/src/tape.c index 2ff74646..82792fe1 100644 --- a/src/tape.c +++ b/src/tape.c @@ -1425,6 +1425,14 @@ void AutoPlayTapes(void) LoadTapeFromFilename(tape_filename); + if (tape.no_valid_file) + { + if (!fileExists(tape_filename)) + Fail("tape file '%s' does not exist", tape_filename); + else + Fail("cannot load tape file '%s'", tape_filename); + } + global.autoplay_leveldir = tape.level_identifier; if (tape.level_nr >= 0 && tape.level_nr < MAX_TAPES_PER_SET)