diff options
Diffstat (limited to 'core/object/message_queue.cpp')
-rw-r--r-- | core/object/message_queue.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/object/message_queue.cpp b/core/object/message_queue.cpp index 762bab75e7..4b0b1ce63d 100644 --- a/core/object/message_queue.cpp +++ b/core/object/message_queue.cpp @@ -481,10 +481,7 @@ CallQueue::~CallQueue() { if (!allocator_is_custom) { memdelete(allocator); } - // This is done here to avoid a circular dependency between the safety checks and the thread singleton pointer. - if (this == MessageQueue::thread_singleton) { - MessageQueue::thread_singleton = nullptr; - } + DEV_ASSERT(!is_current_thread_override); } ////////////////////// @@ -493,7 +490,6 @@ CallQueue *MessageQueue::main_singleton = nullptr; thread_local CallQueue *MessageQueue::thread_singleton = nullptr; void MessageQueue::set_thread_singleton_override(CallQueue *p_thread_singleton) { - DEV_ASSERT(p_thread_singleton); // To unset the thread singleton, don't call this with nullptr, but just memfree() it. #ifdef DEV_ENABLED if (thread_singleton) { thread_singleton->is_current_thread_override = false; |