diff options
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 5 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-config.c | 24 |
2 files changed, 18 insertions, 11 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 1de2c03699..c22daf0041 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,8 @@ +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. + 2005-12-22 Srinivasa Ragavan <sragavan@novell.com> * gui/search/addresstypes.xml: Modified the categories to option menu 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); |