Release references to icons in completion
This commit is contained in:
parent
4bab11061c
commit
85fd237f28
1 changed files with 5 additions and 1 deletions
|
@ -468,7 +468,7 @@ midori_location_action_popup_timeout_cb (gpointer data)
|
||||||
const unsigned char* title = sqlite3_column_text (stmt, 2);
|
const unsigned char* title = sqlite3_column_text (stmt, 2);
|
||||||
GdkPixbuf* icon = katze_load_cached_icon ((gchar*)uri, NULL);
|
GdkPixbuf* icon = katze_load_cached_icon ((gchar*)uri, NULL);
|
||||||
if (!icon)
|
if (!icon)
|
||||||
icon = action->default_icon;
|
icon = g_object_ref (action->default_icon);
|
||||||
if (type == 1 /* history_view */)
|
if (type == 1 /* history_view */)
|
||||||
{
|
{
|
||||||
gtk_list_store_insert_with_values (store, NULL, matches,
|
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);
|
STYLE_COL, 1, FAVICON_COL, icon, -1);
|
||||||
g_free (search_title);
|
g_free (search_title);
|
||||||
}
|
}
|
||||||
|
if (icon != NULL)
|
||||||
|
g_object_unref (icon);
|
||||||
|
|
||||||
matches++;
|
matches++;
|
||||||
result = sqlite3_step (stmt);
|
result = sqlite3_step (stmt);
|
||||||
|
@ -509,6 +511,8 @@ midori_location_action_popup_timeout_cb (gpointer data)
|
||||||
STYLE_COL, 1, FAVICON_COL, icon, -1);
|
STYLE_COL, 1, FAVICON_COL, icon, -1);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
g_free (title);
|
g_free (title);
|
||||||
|
if (icon != NULL)
|
||||||
|
g_object_unref (icon);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
searches += i;
|
searches += i;
|
||||||
|
|
Loading…
Reference in a new issue