Fix delete[] in mxstillpresenter.cpp (#1496)

* Fix delete[] in mxstillpresenter.cpp

Without this the game doesn't  run on Linux :)

* Update LEGO1/omni/src/video/mxstillpresenter.cpp

Co-authored-by: Christian Semmler <mail@csemmler.com>

* Update mxstillpresenter.cpp

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Anders Jenbo 2025-05-18 01:14:25 +02:00 committed by GitHub
parent 45e0e5bdd1
commit 3f0fe654ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,7 @@ void MxStillPresenter::Destroy(MxBool p_fromDestructor)
m_criticalSection.Enter();
if (m_bitmapInfo) {
delete m_bitmapInfo;
delete[] ((MxU8*) m_bitmapInfo);
}
m_bitmapInfo = NULL;
@ -35,7 +35,7 @@ void MxStillPresenter::Destroy(MxBool p_fromDestructor)
void MxStillPresenter::LoadHeader(MxStreamChunk* p_chunk)
{
if (m_bitmapInfo) {
delete m_bitmapInfo;
delete[] ((MxU8*) m_bitmapInfo);
}
MxU8* data = new MxU8[p_chunk->GetLength()];
@ -53,7 +53,7 @@ void MxStillPresenter::CreateBitmap()
m_frameBitmap = new MxBitmap;
m_frameBitmap->ImportBitmapInfo(m_bitmapInfo);
delete m_bitmapInfo;
delete[] ((MxU8*) m_bitmapInfo);
m_bitmapInfo = NULL;
}