From 3f0fe654fff71505d4982c00b68a4944424031d2 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 18 May 2025 01:14:25 +0200 Subject: [PATCH] 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 * Update mxstillpresenter.cpp --------- Co-authored-by: Christian Semmler --- LEGO1/omni/src/video/mxstillpresenter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LEGO1/omni/src/video/mxstillpresenter.cpp b/LEGO1/omni/src/video/mxstillpresenter.cpp index 03ffcb31..a9731233 100644 --- a/LEGO1/omni/src/video/mxstillpresenter.cpp +++ b/LEGO1/omni/src/video/mxstillpresenter.cpp @@ -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; }