PINK: fix SeqTimer updating when actor isn't found

This commit is contained in:
whiterandrek 2018-06-19 20:17:18 +03:00 committed by Eugene Sandulenko
parent b1d516276a
commit 0835b0fee1

View File

@ -53,8 +53,7 @@ void SeqTimer::update() {
_updatesToMessage = _range ? _period + rnd.getRandomNumber(_range) : _period;
Actor *actor = _sequencer->_page->findActor(_actor);
assert(actor);
if (!_sequencer->findMainSequenceActorState(actor->getName()) &&
if (actor && !_sequencer->findMainSequenceActorState(actor->getName()) &&
!_sequencer->findParralelSequenceActorState(actor->getName())) {
actor->onTimerMessage();
}