aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/tattoo_people.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-09-17 21:06:44 -0400
committerPaul Gilbert2015-09-17 21:06:44 -0400
commit8188251c35d3c732c74775f2dae6442b9cefbdc0 (patch)
treea32aae0d1ef8db6765ef18de11fee48bc44133a7 /engines/sherlock/tattoo/tattoo_people.cpp
parentd227e40e53f5458d2055fcb855557c448d405f6b (diff)
downloadscummvm-rg350-8188251c35d3c732c74775f2dae6442b9cefbdc0.tar.gz
scummvm-rg350-8188251c35d3c732c74775f2dae6442b9cefbdc0.tar.bz2
scummvm-rg350-8188251c35d3c732c74775f2dae6442b9cefbdc0.zip
SHERLOCK: RT: Fix crash clicking outside cards in card game
Diffstat (limited to 'engines/sherlock/tattoo/tattoo_people.cpp')
-rw-r--r--engines/sherlock/tattoo/tattoo_people.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp
index fe60189965..46d91cead8 100644
--- a/engines/sherlock/tattoo/tattoo_people.cpp
+++ b/engines/sherlock/tattoo/tattoo_people.cpp
@@ -874,8 +874,8 @@ Common::Point TattooPerson::getSourcePoint() const {
TattooScene &scene = *(TattooScene *)_vm->_scene;
int scaleVal = scene.getScaleVal(_position);
- return Common::Point(_position.x / FIXED_INT_MULTIPLIER + _imageFrame->sDrawXSize(scaleVal) / 2,
- _position.y / FIXED_INT_MULTIPLIER);
+ return Common::Point(_position.x / FIXED_INT_MULTIPLIER +
+ (_imageFrame ? _imageFrame->sDrawXSize(scaleVal) / 2 : 0), _position.y / FIXED_INT_MULTIPLIER);
}
void TattooPerson::setObjTalkSequence(int seq) {