Fix disconnect warning
This commit is contained in:
@@ -37,7 +37,9 @@ void RoomTreeModel::setConnection(NeoChatConnection *connection)
|
|||||||
if (m_connection == connection) {
|
if (m_connection == connection) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
disconnect(m_connection.get(), nullptr, this, nullptr);
|
if (m_connection) {
|
||||||
|
disconnect(m_connection.get(), nullptr, this, nullptr);
|
||||||
|
}
|
||||||
m_connection = connection;
|
m_connection = connection;
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
initializeCategories();
|
initializeCategories();
|
||||||
|
|||||||
Reference in New Issue
Block a user