[Scummvm-git-logs] scummvm master -> e45dd70654e6537b4873f1b6c7b7b1b924f21d84

bluegr bluegr at gmail.com
Sun Mar 10 03:51:53 CET 2019


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:
e45dd70654 COMPOSER: Always check resources before loading them


Commit: e45dd70654e6537b4873f1b6c7b7b1b924f21d84
    https://github.com/scummvm/scummvm/commit/e45dd70654e6537b4873f1b6c7b7b1b924f21d84
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2019-03-10T04:51:39+02:00

Commit Message:
COMPOSER: Always check resources before loading them

Fixes checking for resources in libraries - bug #10861

Changed paths:
    engines/composer/graphics.cpp


diff --git a/engines/composer/graphics.cpp b/engines/composer/graphics.cpp
index 32b9812..b95a6bc 100644
--- a/engines/composer/graphics.cpp
+++ b/engines/composer/graphics.cpp
@@ -92,10 +92,12 @@ void ComposerEngine::loadAnimation(Animation *&anim, uint16 animId, int16 x, int
 		Pipe *pipe = *j;
 		if (!pipe->hasResource(ID_ANIM, animId))
 			continue;
+
 		stream = pipe->getResource(ID_ANIM, animId, false);
 
 		// When loading from savegame, make sure we have the correct stream
-		if ((!size) || (stream->size() >= size)) break;
+		if ((!size) || (stream->size() >= size))
+			break;
 		stream = NULL;
 	}
 
@@ -107,10 +109,14 @@ void ComposerEngine::loadAnimation(Animation *&anim, uint16 animId, int16 x, int
 		}
 		Common::List<Library>::iterator j;
 		for (j = _libraries.begin(); j != _libraries.end(); j++) {
+			if (!j->_archive->hasResource(ID_ANIM, animId))
+				continue;
+
 			stream = j->_archive->getResource(ID_ANIM, animId);
 
 			// When loading from savegame, make sure we have the correct stream
-			if ((!size) || (stream->size() >= size)) break;
+			if ((!size) || (stream->size() >= size))
+				break;
 			stream = NULL;
 		}
 





More information about the Scummvm-git-logs mailing list