From 168c7f50ed10ba7da1039d3f468e3140297121fe Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 31 Mar 2020 10:22:39 +0200 Subject: [PATCH] Check for null notification When starting a phone call on the phone, we enter "talking" state without having created a notification first leading to a crash. --- plugins/telephony/telephonyplugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/telephony/telephonyplugin.cpp b/plugins/telephony/telephonyplugin.cpp index dd5b334fb..f84de9a29 100644 --- a/plugins/telephony/telephonyplugin.cpp +++ b/plugins/telephony/telephonyplugin.cpp @@ -55,7 +55,9 @@ void TelephonyPlugin::createNotification(const NetworkPacket& np) icon = QStringLiteral("call-start"); content = i18n("Missed call from %1", contactName); } else if (event == QLatin1String("talking")) { - m_currentCallNotification->close(); + if (m_currentCallNotification) { + m_currentCallNotification->close(); + } return; }