[Scummvm-git-logs] scummvm master -> 2e5fa559d93718e60889136c903377de8963dc13

sev- sev at scummvm.org
Thu Mar 16 22:35:20 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2e5fa559d9 DIRECTOR: Fix crash when Shared Cast is not present


Commit: 2e5fa559d93718e60889136c903377de8963dc13
    https://github.com/scummvm/scummvm/commit/2e5fa559d93718e60889136c903377de8963dc13
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-03-16T21:34:51Z

Commit Message:
DIRECTOR: Fix crash when Shared Cast is not present

Changed paths:
    engines/director/resource.cpp


diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index 5a964c1..62363bf 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -202,18 +202,18 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) {
 
 	debug(0, "Loading Shared cast '%s'", filename.c_str());
 
-	if (!shardcst->openFile(filename)) {
-		warning("No shared cast %s", filename.c_str());
-
-		return;
-	}
-
 	_sharedDIB = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;
 	_sharedSTXT = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;
 	_sharedSound = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;
 	_sharedBMP = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;
 
 	_sharedScore = new Score(this);
+	if (!shardcst->openFile(filename)) {
+		warning("No shared cast %s", filename.c_str());
+
+		return;
+	}
+
 	_sharedScore->setArchive(shardcst);
 
 	if (shardcst->hasResource(MKTAG('F', 'O', 'N', 'D'), -1)) {





More information about the Scummvm-git-logs mailing list