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.
This commit is contained in:
Kai Uwe Broulik 2020-03-31 10:22:39 +02:00
parent d8029897d5
commit 168c7f50ed

View file

@ -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")) {
if (m_currentCallNotification) {
m_currentCallNotification->close();
}
return;
}