aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/notifier.c8
1 files 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