Commit 8a0bcc24 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix crash, the e-mail client service can be null

Test Plan: I don't get a crash anymore

Reviewers: meven, davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28126
parent 4e9376fc
......@@ -76,7 +76,7 @@ void CfgEmailClient::load(KConfig *)
}
// in case of a service not associated with Email Category and/or x-scheme-handler/mailto
if (m_currentIndex == -1 && !emailClientService->storageId().isEmpty()) {
if (m_currentIndex == -1 && emailClientService && !emailClientService->storageId().isEmpty()) {
const KService::Ptr service = KService::serviceByStorageId(emailClientService->storageId());
const QString icon = !service->icon().isEmpty() ? service->icon() : QStringLiteral("application-x-shellscript");
......
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