aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorwhiterandrek2018-05-12 18:19:46 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commit954ee72b87d3a762cc26bd655cf99a7692e7a0c9 (patch)
tree1dcb644d47ba23b82c758da6774b11976c7bf851 /engines
parent362db13d172eee5dedcd35aab3ea537dcc4bae5c (diff)
downloadscummvm-rg350-954ee72b87d3a762cc26bd655cf99a7692e7a0c9.tar.gz
scummvm-rg350-954ee72b87d3a762cc26bd655cf99a7692e7a0c9.tar.bz2
scummvm-rg350-954ee72b87d3a762cc26bd655cf99a7692e7a0c9.zip
PINK: fixed finding nullptr action
Diffstat (limited to 'engines')
-rw-r--r--engines/pink/objects/actors/actor.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/pink/objects/actors/actor.cpp b/engines/pink/objects/actors/actor.cpp
index bedea256ed..5cdf6e3e4c 100644
--- a/engines/pink/objects/actors/actor.cpp
+++ b/engines/pink/objects/actors/actor.cpp
@@ -47,11 +47,11 @@ Sequencer *Actor::getSequencer() const {
}
Action *Actor::findAction(const Common::String &name) {
- Action ** action = Common::find_if(_actions.begin(), _actions.end(), [&name]
+ auto action = Common::find_if(_actions.begin(), _actions.end(), [&name]
(Action* action) {
return name == action->getName();
- });;
- if (!action)
+ });
+ if (action == _actions.end())
return nullptr;
return *action;
}
@@ -94,7 +94,6 @@ void Actor::setAction(Action *newAction) {
}
if (newAction) {
_isActionEnded = 0;
- _action = newAction;
_action->start(0);
}
}