mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-05-01 18:13:57 +00:00
Fix null pointer dereference in MxCompositeMediaPresenter::StartingTickle (#792)
When skipping the intro quickly, a child presenter's action can become NULL during Tickle() due to a race with the cancellation system. Between the parent's CurrentChunk() peek and the child's internal CurrentChunk() call during Tickle(), a DS_CHUNK_BIT3 chunk can be prepended to the subscriber queue, causing the child to cascade through DoneTickle and EndAction which sets m_action to NULL. Add a null check for GetAction() after Tickle(), consistent with the existing guard in the !m_allChildrenStreaming branch.
This commit is contained in:
parent
375c496791
commit
b3e73aa675
@ -127,7 +127,9 @@ void MxCompositeMediaPresenter::StartingTickle()
|
||||
if (!(*it)->GetAction()->GetStartTime() && ((MxMediaPresenter*) *it)->CurrentChunk() &&
|
||||
!((*it)->GetAction()->GetFlags() & MxDSAction::c_bit9)) {
|
||||
(*it)->Tickle();
|
||||
(*it)->GetAction()->SetFlags((*it)->GetAction()->GetFlags() | MxDSAction::c_bit9);
|
||||
if ((*it)->GetAction()) {
|
||||
(*it)->GetAction()->SetFlags((*it)->GetAction()->GetFlags() | MxDSAction::c_bit9);
|
||||
}
|
||||
m_remainingChildren--;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user