code cleanup
authorHolger Schemel <info@artsoft.org>
Sun, 12 Sep 2021 23:10:40 +0000 (01:10 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 12 Sep 2021 23:10:40 +0000 (01:10 +0200)
src/tape.c

index d77703295f3fcb5ee69619d658bd713de42e36b5..69356b0bfcf5b0e1a45eda034a16818197ef9a55 100644 (file)
@@ -1579,15 +1579,13 @@ static int AutoPlayTapesExt(boolean initialize)
     {
       autoplay.tape_filename = global.autoplay_leveldir;
 
+      if (!fileExists(autoplay.tape_filename))
+       Fail("tape file '%s' does not exist", autoplay.tape_filename);
+
       LoadTapeFromFilename(autoplay.tape_filename);
 
       if (tape.no_valid_file)
-      {
-       if (!fileExists(autoplay.tape_filename))
-         Fail("tape file '%s' does not exist", autoplay.tape_filename);
-       else
-         Fail("cannot load tape file '%s'", autoplay.tape_filename);
-      }
+       Fail("cannot load tape file '%s'", autoplay.tape_filename);
 
       if (tape.no_info_chunk)
        Fail("cannot get levelset from tape file '%s'", autoplay.tape_filename);