diff --git a/LEGO1/lego/legoomni/include/legoanimmmpresenter.h b/LEGO1/lego/legoomni/include/legoanimmmpresenter.h index aeeed0a2..f7e793d4 100644 --- a/LEGO1/lego/legoomni/include/legoanimmmpresenter.h +++ b/LEGO1/lego/legoomni/include/legoanimmmpresenter.h @@ -25,6 +25,7 @@ class LegoAnimMMPresenter : public MxCompositePresenter { }; LegoAnimMMPresenter(); + ~LegoAnimMMPresenter() override; MxLong Notify(MxParam& p_param) override; // vtable+0x04 diff --git a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp index 0e027bef..ff79bb15 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp @@ -28,12 +28,24 @@ LegoAnimMMPresenter::LegoAnimMMPresenter() m_tranInfo = NULL; m_unk0x54 = 0; m_unk0x64 = NULL; - m_unk0x68 = 0; + m_unk0x68 = NULL; m_roiMap = NULL; m_roiMapSize = 0; m_unk0x58 = e_unk0; } +// FUNCTION: LEGO1 0x1004aa60 +LegoAnimMMPresenter::~LegoAnimMMPresenter() +{ + if (VideoManager() != NULL) { + VideoManager()->UnregisterPresenter(*this); + } + + delete m_unk0x68; + + NotificationManager()->Unregister(this); +} + // FUNCTION: LEGO1 0x1004aaf0 MxResult LegoAnimMMPresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action) {