[evolution-data-server] Bug #587558 - Do not crash on contact picture removal in LDAP



commit e031bd3cddfa3f56e35a492b6db3ed09d4b872e7
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jul 15 16:18:46 2009 +0200

    Bug #587558 - Do not crash on contact picture removal in LDAP

 addressbook/backends/ldap/e-book-backend-ldap.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c
index 7eb8653..1a8090f 100644
--- a/addressbook/backends/ldap/e-book-backend-ldap.c
+++ b/addressbook/backends/ldap/e-book-backend-ldap.c
@@ -2189,11 +2189,11 @@ modify_contact_rename_handler (LDAPOp *op, LDAPMessage *res)
 
 				if (mod->mod_op & LDAP_MOD_BVALUES) {
 					gint j;
-					for (j = 0; mod->mod_bvalues[j] && mod->mod_bvalues[j]->bv_val; j++)
+					for (j = 0; mod->mod_bvalues && mod->mod_bvalues[j] && mod->mod_bvalues[j]->bv_val; j++)
 						printf ("\t\t'%s'\n", mod->mod_bvalues[j]->bv_val);
 				} else {
 					gint j;
-					for (j = 0; mod->mod_values[j]; j++)
+					for (j = 0; mod->mod_values && mod->mod_values[j]; j++)
 						printf ("\t\t'%s'\n", mod->mod_values[j]);
 				}
 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]