Commit 5f7350e8 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

flatpak: Do not crash when a source is disabled

Instead, we just don't fully load it but we keep it around as we may
have apps from it.


(cherry picked from commit c3f27139)
parent cfb54919
......@@ -423,6 +423,11 @@ QSharedPointer<FlatpakSource> FlatpakBackend::findSource(FlatpakInstallation *in
return source;
}
}
for (const auto &source : m_flatpakLoadingSources) {
if (source->installation() == installation && source->name() == origin) {
return source;
}
}
Q_UNREACHABLE();
}
......@@ -842,6 +847,7 @@ QSharedPointer<FlatpakSource> FlatpakBackend::integrateRemote(FlatpakInstallatio
auto source = QSharedPointer<FlatpakSource>::create(this, flatpakInstallation, remote);
if (!source->isEnabled() || flatpak_remote_get_noenumerate(remote)) {
m_flatpakSources += source;
metadataRefreshed();
return {};
}
......
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