src: Various fixes from testing
* fixed deleted project could still be selected in the recent project menu * fixed project file not loaded when declining for reload * fixed main in tutorial description not clickable * fixed clang warnings * fixed commands not showing up in autocompletion * fixed classes were expanded when activating aggregation * fixed crash when messagelisteners tried to unregister after messagequeue was destructed
This commit is contained in:
@@ -20,7 +20,12 @@ std::shared_ptr<MessageQueue> MessageQueue::getInstance()
|
||||
|
||||
MessageQueue::~MessageQueue()
|
||||
{
|
||||
// TODO: remove remaining listeners. And tell them that they shouldn't unregister anymore.
|
||||
std::lock_guard<std::mutex> lock(m_listenersMutex);
|
||||
for (size_t i = 0; i < m_listeners.size(); i++)
|
||||
{
|
||||
m_listeners[i]->removedListener();
|
||||
}
|
||||
m_listeners.clear();
|
||||
}
|
||||
|
||||
void MessageQueue::registerListener(MessageListenerBase* listener)
|
||||
|
||||
Reference in New Issue
Block a user