aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2010-02-08 11:01:13 -0600
committerCody Russell <crussell@canonical.com>2010-02-08 11:01:13 -0600
commiteedadcc3cf3a3f76fbe7b308a9ae7f0fa1f888d7 (patch)
treea9d72b0270e5c2d8c3c7f2a316e12c43847087e4
parenta16c8f412a4fe6f57a59386787081118730426c4 (diff)
downloadayatana-indicator-session-eedadcc3cf3a3f76fbe7b308a9ae7f0fa1f888d7.tar.gz
ayatana-indicator-session-eedadcc3cf3a3f76fbe7b308a9ae7f0fa1f888d7.tar.bz2
ayatana-indicator-session-eedadcc3cf3a3f76fbe7b308a9ae7f0fa1f888d7.zip
Check switch_menuitem for NULL first
-rw-r--r--src/session-service.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/session-service.c b/src/session-service.c
index 0038931..62987f2 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -101,13 +101,16 @@ lockdown_changed (GConfClient *client,
if (g_strcmp0 (key, LOCKDOWN_KEY) == 0)
{
- if (gconf_value_get_bool (value))
+ if (switch_menuitem)
{
- dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
- }
- else
- {
- dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
+ if (gconf_value_get_bool (value))
+ {
+ dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
+ }
+ else
+ {
+ dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
+ }
}
}
}