diff --git a/core/object/message_queue.cpp b/core/object/message_queue.cpp index 940de92dbd..98190fd268 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