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.
This commit is contained in:
Anonymous Maarten 2025-12-20 21:19:35 +01:00
parent 7742fb0493
commit f5dfd35faf

View File

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