From f5dfd35faf01a35a2e4e569a8941cc67f0963331 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 20 Dec 2025 21:19:35 +0100 Subject: [PATCH] MxVariable::Destroy() calls `delete this`, and is also used by subclasses Making the destructor virtual assures the destructor of the subclass is called. This fixes a Fix new-delete-type-mismatch sanitizer error, emitted when exiting the game. --- LEGO1/omni/include/mxvariable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LEGO1/omni/include/mxvariable.h b/LEGO1/omni/include/mxvariable.h index 9eda281f..c1863893 100644 --- a/LEGO1/omni/include/mxvariable.h +++ b/LEGO1/omni/include/mxvariable.h @@ -12,6 +12,8 @@ class MxVariable { // FUNCTION: BETA10 0x1007b750 MxVariable() {} + virtual ~MxVariable() {} + // FUNCTION: BETA10 0x1012a840 MxVariable(const char* p_key, const char* p_value) {