Commit f4f2820b authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Never disconnect nullptr

parent 67a28fc1
......@@ -72,8 +72,11 @@ void FeaturedModel::refreshCurrentApplicationBackend()
if (m_backend == backend)
return;
disconnect(m_backend, &AbstractResourcesBackend::fetchingChanged, this, &FeaturedModel::refresh);
disconnect(m_backend, &AbstractResourcesBackend::resourceRemoved, this, &FeaturedModel::removeResource);
if (m_backend) {
disconnect(m_backend, &AbstractResourcesBackend::fetchingChanged, this, &FeaturedModel::refresh);
disconnect(m_backend, &AbstractResourcesBackend::resourceRemoved, this, &FeaturedModel::removeResource);
}
m_backend = backend;
if (backend) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment