[gtk] Icontheme: Clean up gtk_icon_info_load_async
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] Icontheme: Clean up gtk_icon_info_load_async
- Date: Mon, 9 Sep 2019 15:50:40 +0000 (UTC)
commit 5f48f60a93aa48466b70cc7dc3a0c687e722bb70
Author: Timm Bäder <mail baedert org>
Date: Sun Sep 8 11:10:01 2019 +0200
Icontheme: Clean up gtk_icon_info_load_async
gtk/gtkicontheme.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index cee105f9c2..6a8d638313 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -3677,28 +3677,27 @@ gtk_icon_info_load_icon_async (GtkIconInfo *icon_info,
gpointer user_data)
{
GTask *task;
- GtkIconInfo *dup;
- GError *error = NULL;
task = g_task_new (icon_info, cancellable, callback, user_data);
if (icon_info_get_pixbuf_ready (icon_info))
{
+ GError *error = NULL;
GdkPaintable *paintable = gtk_icon_info_load_icon (icon_info, &error);
if (paintable == NULL)
g_task_return_error (task, error);
else
g_task_return_pointer (task, paintable, g_object_unref);
- g_object_unref (task);
}
else
{
- dup = icon_info_dup (icon_info);
+ GtkIconInfo *dup = icon_info_dup (icon_info);
g_task_set_task_data (task, dup, g_object_unref);
g_task_run_in_thread (task, load_icon_thread);
- g_object_unref (task);
}
+
+ g_object_unref (task);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]