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.
This commit is contained in:
Anonymous Maarten 2026-01-01 02:56:47 +01:00 committed by GitHub
parent 7742fb0493
commit 119b2777b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,8 @@ class MxVariable {
// FUNCTION: BETA10 0x1007b750 // FUNCTION: BETA10 0x1007b750
MxVariable() {} MxVariable() {}
virtual ~MxVariable() {}
// FUNCTION: BETA10 0x1012a840 // FUNCTION: BETA10 0x1012a840
MxVariable(const char* p_key, const char* p_value) MxVariable(const char* p_key, const char* p_value)
{ {