From 96ad10715d2f28913d102ed95bde44184cd512fd Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Sun, 10 Aug 2014 13:08:49 +0200 Subject: Check whether setting isValid before converting toBool --- daemon/manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'daemon/manager.cpp') diff --git a/daemon/manager.cpp b/daemon/manager.cpp index e80673d..3dd9108 100644 --- a/daemon/manager.cpp +++ b/daemon/manager.cpp @@ -120,7 +120,8 @@ void Manager::onActiveVoiceCallChanged() { logger()->debug() << "Manager::onActiveVoiceCallChanged()"; - if (!settings->property("incomingCallNotification").toBool()) { + QVariant incomingCallNotification = settings->property("incomingCallNotification"); + if (incomingCallNotification.isValid() && !incomingCallNotification.toBool()) { logger()->debug() << "Ignoring ActiveVoiceCallChanged because of setting!"; return; } -- cgit v1.2.3