Commit 6ee19041 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix crash

When removing resources, remove its references as well.

BUG: 392971
parent f2d87ea7
......@@ -269,6 +269,11 @@ void PackageKitBackend::includePackagesToAdd()
foreach(const auto &pkg, pkgs) {
auto res = m_packages.packages.take(pkg);
if (res) {
if (AppPackageKitResource* ares = qobject_cast<AppPackageKitResource*>(res)) {
for(const auto &ext: res->extends())
m_packages.extendedBy[ext].removeAll(ares);
}
emit resourceRemoved(res);
res->deleteLater();
}
......
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