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,
STYLE_COL, 1, FAVICON_COL, icon, -1);
g_free (search_title);
}
+ if (icon != NULL)
+ g_object_unref (icon);
matches++;
result = sqlite3_step (stmt);
STYLE_COL, 1, FAVICON_COL, icon, -1);
g_free (uri);
g_free (title);
+ if (icon != NULL)
+ g_object_unref (icon);
i++;
}
searches += i;