From: Christian Dywan Date: Sun, 1 May 2011 16:50:25 +0000 (+0200) Subject: Release references to icons in completion X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85fd237f28e4d9c85470e051923fcd7b59b164f5;p=midori Release references to icons in completion --- diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c index b56fb77b..36c4baec 100644 --- a/midori/midori-locationaction.c +++ b/midori/midori-locationaction.c @@ -468,7 +468,7 @@ midori_location_action_popup_timeout_cb (gpointer data) const unsigned char* title = sqlite3_column_text (stmt, 2); GdkPixbuf* icon = katze_load_cached_icon ((gchar*)uri, NULL); if (!icon) - icon = action->default_icon; + icon = g_object_ref (action->default_icon); if (type == 1 /* history_view */) { gtk_list_store_insert_with_values (store, NULL, matches, @@ -483,6 +483,8 @@ midori_location_action_popup_timeout_cb (gpointer data) STYLE_COL, 1, FAVICON_COL, icon, -1); g_free (search_title); } + if (icon != NULL) + g_object_unref (icon); matches++; result = sqlite3_step (stmt); @@ -509,6 +511,8 @@ midori_location_action_popup_timeout_cb (gpointer data) STYLE_COL, 1, FAVICON_COL, icon, -1); g_free (uri); g_free (title); + if (icon != NULL) + g_object_unref (icon); i++; } searches += i;