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:
foxtacles 2026-04-05 11:58:24 -07:00 committed by GitHub
parent 375c496791
commit b3e73aa675
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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--;
}
}