Don't access a Message's memory after calling it's destructor in MessageQueue. (Even though the way the code works currently this was not really a bug, but it can easily become one.)

This commit is contained in:
Relintai 2024-06-18 10:38:58 +02:00
parent 05f19a003b
commit 0bdb0ccac8

View File

@ -438,12 +438,12 @@ MessageQueue::~MessageQueue() {
}
}
message->~Message();
read_pos += sizeof(Message);
if ((message->type & FLAG_MASK) != TYPE_NOTIFICATION) {
read_pos += sizeof(Variant) * message->args;
}
message->~Message();
}
} // for which