aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-10 08:20:35 -0400
committerPaul Gilbert2016-04-10 08:20:35 -0400
commitc9f322887c257c4a1c4eb54dfc4746bf0219a6e6 (patch)
treeb433495a434eb648c2d1daec1270d6c02ed54911
parentd5e346681f3019a2394eec23f566b347f82edcf6 (diff)
downloadscummvm-rg350-c9f322887c257c4a1c4eb54dfc4746bf0219a6e6.tar.gz
scummvm-rg350-c9f322887c257c4a1c4eb54dfc4746bf0219a6e6.tar.bz2
scummvm-rg350-c9f322887c257c4a1c4eb54dfc4746bf0219a6e6.zip
TITANIC: Fix CGameObject::changeStatus
-rw-r--r--engines/titanic/core/game_object.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index b2df9f6f54..feeabdb5dc 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -360,7 +360,9 @@ void CGameObject::fn1(int val1, int val2, int val3) {
if (_surface) {
// TODO: Figure out where to do this legitimately
- static_cast<OSMovie *>(_surface->_movie)->_gameObject = this;
+ OSMovie *movie = static_cast<OSMovie *>(_surface->_movie);
+ if (movie)
+ movie->_gameObject = this;
_surface->proc34(val1, val2, val3, val3 != 0);
@@ -370,7 +372,8 @@ void CGameObject::fn1(int val1, int val2, int val3) {
}
void CGameObject::changeStatus(int newStatus) {
- if (_frameNumber == -1 && !_resource.empty()) {
+ _frameNumber = -1;
+ if (!_surface && !_resource.empty()) {
loadResource(_resource);
_resource.clear();
}