diff --git a/applets/kicker/plugin/appentry.cpp b/applets/kicker/plugin/appentry.cpp --- a/applets/kicker/plugin/appentry.cpp +++ b/applets/kicker/plugin/appentry.cpp @@ -144,7 +144,10 @@ QObject *appletInterface = m_owner->rootModel()->property("appletInterface").value(); - const bool systemImmutable = appletInterface->property("immutability").toInt() == Plasma::Types::SystemImmutable; + bool systemImmutable = false; + if (appletInterface) { + systemImmutable = (appletInterface->property("immutability").toInt() == Plasma::Types::SystemImmutable); + } const QVariantList &addLauncherActions = Kicker::createAddLauncherActionList(appletInterface, m_service); if (!systemImmutable && !addLauncherActions.isEmpty()) { @@ -169,15 +172,17 @@ actionList << Kicker::appstreamActions(m_service); } - QQmlPropertyMap *appletConfig = qobject_cast(appletInterface->property("configuration").value()); + if (appletInterface) { + QQmlPropertyMap *appletConfig = qobject_cast(appletInterface->property("configuration").value()); - if (appletConfig && appletConfig->contains(QLatin1String("hiddenApplications")) && qobject_cast(m_owner)) { - const QStringList &hiddenApps = appletConfig->value(QLatin1String("hiddenApplications")).toStringList(); + if (appletConfig && appletConfig->contains(QLatin1String("hiddenApplications")) && qobject_cast(m_owner)) { + const QStringList &hiddenApps = appletConfig->value(QLatin1String("hiddenApplications")).toStringList(); - if (!hiddenApps.contains(m_service->menuId())) { - QVariantMap hideAction = Kicker::createActionItem(i18n("Hide Application"), QStringLiteral("hideApplication")); - hideAction[QStringLiteral("icon")] = QStringLiteral("hint"); - actionList << hideAction; + if (!hiddenApps.contains(m_service->menuId())) { + QVariantMap hideAction = Kicker::createActionItem(i18n("Hide Application"), QStringLiteral("hideApplication")); + hideAction[QStringLiteral("icon")] = QStringLiteral("hint"); + actionList << hideAction; + } } } diff --git a/applets/kicker/plugin/runnermatchesmodel.cpp b/applets/kicker/plugin/runnermatchesmodel.cpp --- a/applets/kicker/plugin/runnermatchesmodel.cpp +++ b/applets/kicker/plugin/runnermatchesmodel.cpp @@ -124,7 +124,10 @@ QObject *appletInterface = static_cast(parent())->appletInterface(); - const bool systemImmutable = appletInterface->property("immutability").toInt() == Plasma::Types::SystemImmutable; + bool systemImmutable = false; + if (appletInterface) { + systemImmutable = (appletInterface->property("immutability").toInt() == Plasma::Types::SystemImmutable); + } const QVariantList &addLauncherActions = Kicker::createAddLauncherActionList(appletInterface, service); if (!systemImmutable && !addLauncherActions.isEmpty()) {