[Scummvm-git-logs] scummvm master -> 8530d9fbc5a5292ac3f4114aab54db0602278ca2

whiterandrek whiterandrek at gmail.com
Sun Jul 29 20:35:55 CEST 2018


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:
8530d9fbc5 PINK: fixed Coverity warnings


Commit: 8530d9fbc5a5292ac3f4114aab54db0602278ca2
    https://github.com/scummvm/scummvm/commit/8530d9fbc5a5292ac3f4114aab54db0602278ca2
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2018-07-29T21:34:20+03:00

Commit Message:
PINK: fixed Coverity warnings

Changed paths:
    engines/pink/objects/actions/action_still.cpp
    engines/pink/pink.cpp


diff --git a/engines/pink/objects/actions/action_still.cpp b/engines/pink/objects/actions/action_still.cpp
index 7150515..4340321 100644
--- a/engines/pink/objects/actions/action_still.cpp
+++ b/engines/pink/objects/actions/action_still.cpp
@@ -67,8 +67,9 @@ void ActionStill::setFrame(uint frame) {
 }
 
 void ActionStill::nextFrameLooped() {
-	assert(_decoder.getFrameCount() != 0);
-	setFrame((_decoder.getCurFrame() + 1) % _decoder.getFrameCount());
+	if (_decoder.getFrameCount() != 0) {
+		setFrame((_decoder.getCurFrame() + 1) % _decoder.getFrameCount());
+	}
 }
 
 } // End of namespace Pink
diff --git a/engines/pink/pink.cpp b/engines/pink/pink.cpp
index 699f2cc..64121b6 100644
--- a/engines/pink/pink.cpp
+++ b/engines/pink/pink.cpp
@@ -40,7 +40,7 @@ namespace Pink {
 
 PinkEngine::PinkEngine(OSystem *system, const ADGameDescription *desc)
 	: Engine(system), _console(nullptr), _rnd("pink"),
-	_desc(*desc), _bro(nullptr), _actor(nullptr),
+	_desc(*desc), _bro(nullptr), _menu(nullptr), _actor(nullptr),
 	_module(nullptr), _director(nullptr), _pdaMgr(this) {
 
 	DebugMan.addDebugChannel(kPinkDebugGeneral, "general", "General issues");
@@ -73,8 +73,9 @@ Common::Error PinkEngine::init() {
 
 	Common::PEResources exeResources;
 	Common::String fileName = isPeril() ? "pptp.exe" : "hpp.exe";
-	exeResources.loadFromEXE(fileName);
-
+	if (!exeResources.loadFromEXE(fileName)) {
+		return Common::kNoGameDataFoundError;
+	}
 
 	_console = new Console(this);
 	_director = new Director();





More information about the Scummvm-git-logs mailing list