Fix uninitialized presenter (#525)

This commit is contained in:
Anders Jenbo 2025-07-05 05:21:32 +02:00 committed by GitHub
parent af9f7cd791
commit b2156c94bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -671,14 +671,14 @@ MxLong RegistrationBook::HandlePathStruct(LegoPathStructNotificationParam& p_par
MxBool RegistrationBook::CreateSurface()
{
MxCompositePresenterList* presenters = m_checkmark[0]->GetList();
MxStillPresenter *presenter, *uninitialized;
MxStillPresenter* presenter;
if (presenters) {
if (presenters->begin() != presenters->end()) {
presenter = (MxStillPresenter*) presenters->front();
}
else {
presenter = uninitialized; // intentionally uninitialized variable
presenter = NULL;
}
if (presenter) {