diff options
author | Andrei Prykhodko | 2018-07-29 21:34:20 +0300 |
---|---|---|
committer | Andrei Prykhodko | 2018-07-29 21:34:20 +0300 |
commit | 8530d9fbc5a5292ac3f4114aab54db0602278ca2 (patch) | |
tree | bc20e0ed46816987fe166704e7df593ee80e6db0 /engines/pink | |
parent | bb732cd9c8675a4ea09bd6f2e491e4ea471a1c1d (diff) | |
download | scummvm-rg350-8530d9fbc5a5292ac3f4114aab54db0602278ca2.tar.gz scummvm-rg350-8530d9fbc5a5292ac3f4114aab54db0602278ca2.tar.bz2 scummvm-rg350-8530d9fbc5a5292ac3f4114aab54db0602278ca2.zip |
PINK: fixed Coverity warnings
Diffstat (limited to 'engines/pink')
-rw-r--r-- | engines/pink/objects/actions/action_still.cpp | 5 | ||||
-rw-r--r-- | engines/pink/pink.cpp | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/engines/pink/objects/actions/action_still.cpp b/engines/pink/objects/actions/action_still.cpp index 715051542f..4340321d21 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 699f2cc0f9..64121b6699 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(); |