aboutsummaryrefslogtreecommitdiff
path: root/engines/pink
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pink')
-rw-r--r--engines/pink/objects/actions/action_still.cpp5
-rw-r--r--engines/pink/pink.cpp7
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();