diff options
author | Cody Russell <crussell@canonical.com> | 2010-02-08 11:01:13 -0600 |
---|---|---|
committer | Cody Russell <crussell@canonical.com> | 2010-02-08 11:01:13 -0600 |
commit | eedadcc3cf3a3f76fbe7b308a9ae7f0fa1f888d7 (patch) | |
tree | a9d72b0270e5c2d8c3c7f2a316e12c43847087e4 /src | |
parent | a16c8f412a4fe6f57a59386787081118730426c4 (diff) | |
download | ayatana-indicator-session-eedadcc3cf3a3f76fbe7b308a9ae7f0fa1f888d7.tar.gz ayatana-indicator-session-eedadcc3cf3a3f76fbe7b308a9ae7f0fa1f888d7.tar.bz2 ayatana-indicator-session-eedadcc3cf3a3f76fbe7b308a9ae7f0fa1f888d7.zip |
Check switch_menuitem for NULL first
Diffstat (limited to 'src')
-rw-r--r-- | src/session-service.c | 15 |
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); + } } } } |