2007-07-26 [colin] 2.10.0cvs64
authorColin Leroy <colin@colino.net>
Thu, 26 Jul 2007 06:28:45 +0000 (06:28 +0000)
committerColin Leroy <colin@colino.net>
Thu, 26 Jul 2007 06:28:45 +0000 (06:28 +0000)
* src/addressbook.c
* src/editaddress.c
Fix two vCard-related crashes

ChangeLog
PATCHSETS
configure.ac
src/addressbook.c
src/editaddress.c

index 798ccbd6206a4499a80281995c0157ee973b372c..259f58aae81fcfde053b278e2aa641a0f245765b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-26 [colin]     2.10.0cvs64
+
+       * src/addressbook.c
+       * src/editaddress.c
+               Fix two vCard-related crashes
+
 2007-07-25 [colin]     2.10.0cvs63
 
        * src/inc.c
index e914404c44d689b153bb3bd77b54fa5f50f831c2..f78ad696a0e5bc4ef2f27c9c2af0fa6ec4e7803d 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.312 -r 1.395.2.313 src/summaryview.c;  ) > 2.10.0cvs61.patchset
 ( cvs diff -u -r 1.96.2.178 -r 1.96.2.179 src/textview.c;  ) > 2.10.0cvs62.patchset
 ( cvs diff -u -r 1.149.2.77 -r 1.149.2.78 src/inc.c;  cvs diff -u -r 1.274.2.200 -r 1.274.2.201 src/mainwindow.c;  cvs diff -u -r 1.204.2.142 -r 1.204.2.143 src/prefs_common.c;  cvs diff -u -r 1.103.2.88 -r 1.103.2.89 src/prefs_common.h;  cvs diff -u -r 1.1.2.18 -r 1.1.2.19 src/prefs_receive.c;  cvs diff -u -r 1.3.2.7 -r 1.3.2.8 src/statusbar.h;  cvs diff -u -r 1.395.2.313 -r 1.395.2.314 src/summaryview.c;  cvs diff -u -r 1.43.2.78 -r 1.43.2.79 src/toolbar.c;  cvs diff -u -r 1.12.2.37 -r 1.12.2.38 src/gtk/prefswindow.c;  ) > 2.10.0cvs63.patchset
+( cvs diff -u -r 1.60.2.92 -r 1.60.2.93 src/addressbook.c;  cvs diff -u -r 1.14.2.28 -r 1.14.2.29 src/editaddress.c;  ) > 2.10.0cvs64.patchset
index ec7e9626bd8013dbb3bf436ac9179aeb477a8b51..567951c04e2738081468b878c1c50bacd6a54b71 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=10
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=63
+EXTRA_VERSION=64
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 6b38f11c71a71b027691ffb6e51ebca25a3df378..27b4edf7702d1452dd7f983e27b15f89e1ff346b 100644 (file)
@@ -1467,7 +1467,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
                                        addritem_folder_remove_person(ADAPTER_FOLDER(pobj)->itemFolder, item);
                                item = addrbook_remove_person( abf, item );
 #ifdef USE_LDAP
-                               if (ds->type == ADDR_IF_LDAP) {
+                               if (ds && ds->type == ADDR_IF_LDAP) {
                                        LdapServer *server = ds->rawDataSource;
                                        ldapsvr_set_modified(server, TRUE);
                                        ldapsvr_update_book(server, item);
@@ -1821,10 +1821,10 @@ static void addressbook_tree_selected(GtkCTree *ctree, GtkCTreeNode *node,
 
                        /* Load folders into the tree */
                        rootFolder = addrindex_ds_get_root_folder( ds );
-                       if( ds->type == ADDR_IF_JPILOT ) {
+                       if( ds && ds->type == ADDR_IF_JPILOT ) {
                                aot = ADDR_CATEGORY;
                        }
-                       else if( ds->type == ADDR_IF_LDAP ) {
+                       else if( ds && ds->type == ADDR_IF_LDAP ) {
                                aot = ADDR_LDAP_QUERY;
                        }
                        else {
@@ -1926,7 +1926,7 @@ static void addressbook_list_menu_setup( void ) {
                        if( ! addrselect_test_empty( _addressSelect_ ) ) canCut = TRUE;
                        canDelete = canEdit;
                }
-               if( iface->type == ADDR_IF_LDAP ) {
+               if( iface && iface->type == ADDR_IF_LDAP ) {
                        if( obj ) canBrowse = TRUE;
                        canEdit = TRUE;
                        canDelete = TRUE;
@@ -2927,7 +2927,7 @@ static ItemFolder * addressbook_setup_subf(
        /* Setup a query */
        if( *title == '\0' || strlen( title ) < 1 ) return NULL;
 
-       if( ds->type == ADDR_IF_LDAP ) {
+       if( ds && ds->type == ADDR_IF_LDAP ) {
 #if USE_LDAP
                aoType = ADDR_LDAP_QUERY;
 #endif
@@ -3013,7 +3013,7 @@ static void addressbook_new_address_cb( gpointer data, guint action, GtkWidget *
                        ItemPerson *person;
                        ItemFolder *folder = NULL;
 #ifdef USE_LDAP
-                       if (abf->type == ADDR_IF_LDAP) {
+                       if (abf && abf->type == ADDR_IF_LDAP) {
                                GtkCTreeNode *parentNode;
                                ds = addressbook_find_datasource( GTK_CTREE_NODE( addrbook.treeSelected ) );
                                if( ds == NULL ) return;
@@ -3040,7 +3040,7 @@ static void addressbook_new_address_cb( gpointer data, guint action, GtkWidget *
                                                                  addressbook_new_address_from_book_post_cb,
                                                                  TRUE );
 #ifdef USE_LDAP
-                       if (abf->type == ADDR_IF_LDAP) {
+                       if (abf && abf->type == ADDR_IF_LDAP) {
                                LdapServer *server = ds->rawDataSource;
                                ldapsvr_set_modified(server, TRUE);
                                ldapsvr_update_book(server, NULL);
@@ -3062,7 +3062,7 @@ static void addressbook_new_address_cb( gpointer data, guint action, GtkWidget *
                ItemFolder *folder = ADAPTER_FOLDER(pobj)->itemFolder;
                ItemPerson *person;
 #ifdef USE_LDAP
-               if (abf->type == ADDR_IF_LDAP) {
+               if (abf && abf->type == ADDR_IF_LDAP) {
                        GtkCTreeNode *parentNode;
                        ds = addressbook_find_datasource( GTK_CTREE_NODE( addrbook.treeSelected ) );
                        if( ds == NULL ) return;
@@ -3090,7 +3090,7 @@ static void addressbook_new_address_cb( gpointer data, guint action, GtkWidget *
                                                          addressbook_new_address_from_folder_post_cb,
                                                          TRUE );
 #ifdef USE_LDAP
-               if (abf->type == ADDR_IF_LDAP) {
+               if (abf && abf->type == ADDR_IF_LDAP) {
                        LdapServer *server = ds->rawDataSource;
                        ldapsvr_set_modified(server, TRUE);
                        ldapsvr_update_book(server, NULL);
@@ -3263,7 +3263,7 @@ static void addressbook_edit_address( gpointer data, guint action, GtkWidget *wi
                                                                                   (prefs_common.addressbook_use_editaddress_dialog||force_focus) )
                                  != NULL ) { 
 #ifdef USE_LDAP
-                               if (abf->type == ADDR_IF_LDAP) {
+                               if (abf && abf->type == ADDR_IF_LDAP) {
                                        ldapsvr_set_modified( (LdapServer *) abf, TRUE );
                                        person->status = UPDATE_ENTRY;
                                }
@@ -3282,7 +3282,7 @@ static void addressbook_edit_address( gpointer data, guint action, GtkWidget *wi
                                                                          (prefs_common.addressbook_use_editaddress_dialog||force_focus) )
                        != NULL ) {
 #ifdef USE_LDAP
-                               if (abf->type == ADDR_IF_LDAP) {
+                               if (abf && abf->type == ADDR_IF_LDAP) {
                                        ldapsvr_set_modified( (LdapServer *) abf, TRUE );
                                        person->status = UPDATE_ENTRY;
                                }
@@ -4342,7 +4342,7 @@ static void addressbook_perform_search(
        /* Setup a query */
        if( *searchTerm == '\0' || strlen( searchTerm ) < 1 ) return;
 
-       if( ds->type == ADDR_IF_LDAP ) {
+       if( ds && ds->type == ADDR_IF_LDAP ) {
 #if USE_LDAP
                aoType = ADDR_LDAP_QUERY;
 #endif
@@ -4471,7 +4471,7 @@ static void addressbook_browse_entry_cb(void)
                return;
        }
 
-       if( iface->type == ADDR_IF_LDAP ) {
+       if( iface && iface->type == ADDR_IF_LDAP ) {
                browseldap_entry(ds, person->externalID);
        }
 }
index 38c550365f03a2a616bb1c755caa7bc32842d163..03700b3fe11e7754fc7d22cad389e24cb90ca22c 100644 (file)
@@ -1387,7 +1387,7 @@ ItemPerson *addressbook_edit_person( AddressBookFile *abf, ItemFolder *parent_fo
        current_person = person;
        current_parent_folder = parent_folder;
        edit_person_close_post_update_cb = post_update_cb;
-       personeditdlg.ldap = (abf->type == ADBOOKTYPE_LDAP)? TRUE : FALSE;
+       personeditdlg.ldap = (abf && abf->type == ADBOOKTYPE_LDAP)? TRUE : FALSE;
 
        if( !personeditdlg.container )
                addressbook_edit_person_create(parent_container, &cancelled);