aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook-config.c
diff options
context:
space:
mode:
authorShi Pu <shi.pu@sun.com>2006-01-05 13:55:25 +0800
committerHarry Lu <haip@src.gnome.org>2006-01-05 13:55:25 +0800
commit6ce173f5803379a56b57c37949e9424a496617e8 (patch)
tree8ee7e32a9ae40f94109be952bf05d10cf8234997 /addressbook/gui/component/addressbook-config.c
parente35c5c7beaa369c6a4e38f5f93cc9676bee29063 (diff)
downloadgsoc2013-evolution-6ce173f5803379a56b57c37949e9424a496617e8.tar
gsoc2013-evolution-6ce173f5803379a56b57c37949e9424a496617e8.tar.gz
gsoc2013-evolution-6ce173f5803379a56b57c37949e9424a496617e8.tar.bz2
gsoc2013-evolution-6ce173f5803379a56b57c37949e9424a496617e8.tar.lz
gsoc2013-evolution-6ce173f5803379a56b57c37949e9424a496617e8.tar.xz
gsoc2013-evolution-6ce173f5803379a56b57c37949e9424a496617e8.tar.zst
gsoc2013-evolution-6ce173f5803379a56b57c37949e9424a496617e8.zip
add a not NULL-pointer check before using lud->scope.
2006-01-04 Shi Pu <shi.pu@sun.com> * gui/component/addressbook-config.c (eabc_details_search): add a not NULL-pointer check before using lud->scope. svn path=/trunk/; revision=31056
Diffstat (limited to 'addressbook/gui/component/addressbook-config.c')
-rw-r--r--addressbook/gui/component/addressbook-config.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index 310d433694..b8822848f7 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -890,17 +890,19 @@ eabc_details_search(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, s
g_signal_connect (sdialog->rootdn, "changed", G_CALLBACK (rootdn_changed_cb), sdialog);
sdialog->scope_optionmenu = glade_xml_get_widget (gui, "scope-optionmenu");
- switch (lud->lud_scope) {
- case LDAP_SCOPE_BASE:
- sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_BASE;
- break;
- default:
- case LDAP_SCOPE_ONELEVEL:
- sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_ONELEVEL;
- break;
- case LDAP_SCOPE_SUBTREE:
- sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_SUBTREE;
- break;
+ if (lud) {
+ switch (lud->lud_scope) {
+ case LDAP_SCOPE_BASE:
+ sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_BASE;
+ break;
+ default:
+ case LDAP_SCOPE_ONELEVEL:
+ sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_ONELEVEL;
+ break;
+ case LDAP_SCOPE_SUBTREE:
+ sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_SUBTREE;
+ break;
+ }
}
gtk_option_menu_set_history (GTK_OPTION_MENU(sdialog->scope_optionmenu), sdialog->scope);
g_signal_connect(sdialog->scope_optionmenu, "changed", G_CALLBACK(scope_optionmenu_changed_cb), sdialog);