From d0f8e084e4ec63e4c752f1f24fc6853d00a97b4b Mon Sep 17 00:00:00 2001 From: Tristan Matthews Date: Fri, 13 Jul 2012 10:17:58 -0400 Subject: [PATCH] * #13254: gnome: fix address book compilation for gtk3 and crasher bug --- gnome/src/contacts/searchbar.c | 4 ++-- plugins/addressbook/evolution/eds.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gnome/src/contacts/searchbar.c b/gnome/src/contacts/searchbar.c index a19806425..2cdb299eb 100644 --- a/gnome/src/contacts/searchbar.c +++ b/gnome/src/contacts/searchbar.c @@ -76,7 +76,8 @@ void searchbar_entry_changed(GtkEntry* entry UNUSED, gchar* arg1 UNUSED, gpointe static gchar *get_combobox_active_text(GtkWidget *widget) { GtkTreeIter iter; - gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widget), &iter); + if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widget), &iter)) + return NULL; GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(widget)); gchar *string = NULL; /* this will return a strdup'd string of the text for the active @@ -128,7 +129,6 @@ void update_searchbar_addressbook_list() // store the current active text gchar *activeText = get_combobox_active_text(cbox); - if (activeText == NULL) activeText = g_strdup(""); diff --git a/plugins/addressbook/evolution/eds.c b/plugins/addressbook/evolution/eds.c index b1171fb43..a36efcbcd 100644 --- a/plugins/addressbook/evolution/eds.c +++ b/plugins/addressbook/evolution/eds.c @@ -37,7 +37,6 @@ */ #include -#include #include #include #include "eds.h"