From 119b2777b88d9df1d33446d3c053f1787af94cb5 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 1 Jan 2026 02:56:47 +0100 Subject: [PATCH] MxVariable::Destroy() calls `delete this`, and is also used by subclasses (#759) Making the destructor virtual assures the destructor of the subclass is called. This fixes a 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) {