diff --git a/core/object/message_queue.cpp b/core/object/message_queue.cpp index 940de92db..98190fd26 100644 --- a/core/object/message_queue.cpp +++ b/core/object/message_queue.cpp @@ -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