aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/tattoo/tattoo_people.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp
index a8c906a41a..3d472bc9d2 100644
--- a/engines/sherlock/tattoo/tattoo_people.cpp
+++ b/engines/sherlock/tattoo/tattoo_people.cpp
@@ -97,10 +97,12 @@ void TattooPerson::adjustSprite() {
if (!_walkCount) {
// If there are remaining points to walk, move to the next one
- people._walkDest = _walkTo.pop();
- setWalking();
- } else {
- gotoStand();
+ if (!_walkTo.empty()) {
+ people._walkDest = _walkTo.pop();
+ setWalking();
+ } else {
+ gotoStand();
+ }
}
}