From 27122e92856bbe4efcdfc4975b46a0c6dee67cb9 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 4 Jan 2016 10:10:25 -0600 Subject: assume we're in silent mode if we can't get an accounts-service proxy --- src/notifier.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/notifier.c b/src/notifier.c index 696556a..4b7aede 100644 --- a/src/notifier.c +++ b/src/notifier.c @@ -187,8 +187,12 @@ silent_mode (IndicatorPowerNotifier * self) { priv_t * const p = get_priv (self); - return (p->accounts_service_sound_proxy != NULL) - && (dbus_accounts_service_sound_get_silent_mode(p->accounts_service_sound_proxy)); + /* if we don't have a proxy yet, assume we're in silent mode + as a "do no harm" level of response */ + if (p->accounts_service_sound_proxy == NULL) + return TRUE; + + return dbus_accounts_service_sound_get_silent_mode(p->accounts_service_sound_proxy); } #endif -- cgit v1.2.3