Always check for nullptr before accessing KNSCore::EntryWrapper

wilder-5.24
Alexander Lohnau 5 years ago
parent 8afe8df72d
commit aaad87461f
  1. 3
      kcms/colors/colors.cpp
  2. 3
      kcms/lookandfeel/kcm.cpp

@ -119,6 +119,9 @@ bool KCMColors::downloadingFile() const
void KCMColors::knsEntryChanged(KNSCore::EntryWrapper *entry)
{
if (!entry) {
return;
}
m_model->load();
// If a new theme was installed, select the first color file in it

@ -119,6 +119,9 @@ KCMLookandFeel::~KCMLookandFeel()
void KCMLookandFeel::knsEntryChanged(KNSCore::EntryWrapper *wrapper)
{
if (!wrapper) {
return;
}
const KNSCore::EntryInternal entry = wrapper->entry();
auto removeItemFromModel = [&entry, this]() {
const QString guessedPluginId = QFileInfo(entry.uninstalledFiles().constFirst()).fileName();

Loading…
Cancel
Save