# HG changeset patch # User Richard Laager # Date 1141697519 0 # Node ID df841c5c36381b2db6e7cb73abe5ab24da2bbfbc # Parent c734909b3d433d02010149a50caa4e8ceeb60529 [gaim-migrate @ 15795] (19:58:46) faceprint: I don't think gtk_entry_get_text ever returns NULL (20:03:43) faceprint: i think the purpose of that if statement was to only do anything if they actually entered any text I've undone my previous changes and fixed the inner if...else if...else block to match. diff -r c734909b3d43 -r df841c5c3638 plugins/gevolution/new_person_dialog.c --- a/plugins/gevolution/new_person_dialog.c Tue Mar 07 02:09:05 2006 +0000 +++ b/plugins/gevolution/new_person_dialog.c Tue Mar 07 02:11:59 2006 +0000 @@ -104,7 +104,7 @@ lastname = gtk_entry_get_text(GTK_ENTRY(dialog->lastname)); email = gtk_entry_get_text(GTK_ENTRY(dialog->email)); - if (firstname != NULL || lastname != NULL) + if (*firstname || *lastname) { if (dialog->contact == NULL) { @@ -112,9 +112,9 @@ dialog->contact = e_contact_new(); - if (lastname != NULL && firstname != NULL) + if (*lastname && *firstname) file_as = g_strdup_printf("%s, %s", lastname, firstname); - else if (lastname != NULL) + else if (*lastname) file_as = g_strdup(lastname); else file_as = g_strdup(firstname);