From d3b0c549d912673c3552eb0594c8f1d7e6784b7d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergio=20Villar=20Sen=C3=ADn?= Date: Tue, 15 Dec 2009 12:18:15 +0100 Subject: [PATCH] Ignore empty addresses when checking recipients Fixes NB#139674 Fixes https://bugs.maemo.org/show_bug.cgi?id=6700 --- src/hildon2/modest-address-book.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hildon2/modest-address-book.c b/src/hildon2/modest-address-book.c index 993e091..2f31f2f 100644 --- a/src/hildon2/modest-address-book.c +++ b/src/hildon2/modest-address-book.c @@ -767,6 +767,13 @@ modest_address_book_check_names (ModestRecptEditor *recpt_editor, end_ptr = g_utf8_offset_to_pointer (recipients, end_pos); address = g_strstrip (g_strndup (start_ptr, end_ptr - start_ptr)); + + /* Ignore empty addresses */ + if (!g_strcmp0 (address, "")) { + g_free (address); + goto next_address; + } + gtk_text_buffer_get_iter_at_offset (buffer, &start_iter, start_pos); gtk_text_buffer_get_iter_at_offset (buffer, &end_iter, end_pos); gtk_text_buffer_select_range (buffer, &start_iter, &end_iter); @@ -863,6 +870,7 @@ modest_address_book_check_names (ModestRecptEditor *recpt_editor, if (result == FALSE) break; + next_address: current_start = g_slist_next (current_start); current_end = g_slist_next (current_end); } -- 1.7.9.5