From d168d2a50366c528dab65415cd4f6e82afdfb645 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Wed, 8 Dec 2021 18:25:36 +0100 Subject: [PATCH] lookandfeel: Add missing check if list of files is empty BUG: 439797 --- kcms/lookandfeel/kcm.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kcms/lookandfeel/kcm.cpp b/kcms/lookandfeel/kcm.cpp index f51dd9021..544b485ad 100644 --- a/kcms/lookandfeel/kcm.cpp +++ b/kcms/lookandfeel/kcm.cpp @@ -134,7 +134,9 @@ void KCMLookandFeel::knsEntryChanged(KNSCore::EntryWrapper *wrapper) if (entry.status() == KNS3::Entry::Deleted && !entry.uninstalledFiles().isEmpty()) { removeItemFromModel(); } else if (entry.status() == KNS3::Entry::Installed && !entry.installedFiles().isEmpty()) { - removeItemFromModel(); // In case we updated it we don't want to have it in twice + if (!entry.uninstalledFiles().isEmpty()) { + removeItemFromModel(); // In case we updated it we don't want to have it in twice + } KPackage::Package pkg = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); pkg.setPath(entry.installedFiles().constFirst()); addKPackageToModel(pkg);