]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/cutscene.cpp
Fix all issues found by the Clang Static Analyzer.
[quix0rs-blobwars.git] / src / cutscene.cpp
index 1592addfa241d1d9f8c0788322d898117dad00da..68672b6b0a3a779f139dbfa3dce9fce8a8d80c8a 100644 (file)
@@ -64,7 +64,7 @@ void createSceneList()
                        line = strtok(NULL, "\n");
                }
                
-               if (strcmp(line, "@none@") != 0)
+               if (scene && strcmp(line, "@none@") != 0)
                {
                        scene->appendText(line);
                }
@@ -78,7 +78,7 @@ bool setupScene(const char *stagename)
        char sceneLine[1024];
 
        if (!engine.loadData(_("data/ending")))
-               graphics.showErrorAndExit("Couldn't load cutscene data file (%s)", _("data/ending"));
+               return graphics.showErrorAndExit("Couldn't load cutscene data file (%s)", _("data/ending")), false;
 
        char *line = strtok((char*)engine.dataBuffer, "\n");
        int i = 0;