fixed warning for missing level template when loading level
authorHolger Schemel <info@artsoft.org>
Fri, 17 Aug 2018 13:11:19 +0000 (15:11 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 17 Aug 2018 13:11:27 +0000 (15:11 +0200)
src/files.c

index 151c807..37864e0 100644 (file)
@@ -6582,6 +6582,13 @@ void LoadLevelTemplate(int nr)
 {
   char *filename;
 
+  if (!fileExists(getGlobalLevelTemplateFilename()))
+  {
+    Error(ERR_WARN, "no level template found for this level");
+
+    return;
+  }
+
   setLevelFileInfo(&level_template.file_info, nr);
   filename = level_template.file_info.filename;