[gthumb] object_ready_with_error: keep a reference of the object
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] object_ready_with_error: keep a reference of the object
- Date: Wed, 11 Dec 2019 16:49:48 +0000 (UTC)
commit 0a33c3e28d09bc7d385a7612974e1626cd4a994c
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri Dec 6 12:53:33 2019 +0100
object_ready_with_error: keep a reference of the object
gthumb/glib-utils.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/glib-utils.c b/gthumb/glib-utils.c
index b15da74d..573a4014 100644
--- a/gthumb/glib-utils.c
+++ b/gthumb/glib-utils.c
@@ -200,7 +200,8 @@ exec_object_ready_func (gpointer user_data)
ObjectReadyData *data = user_data;
g_source_remove (data->id);
- data->ready_func (G_OBJECT (data->object), data->error, data->user_data);
+ data->ready_func (data->object, data->error, data->user_data);
+ _g_object_unref (data->object);
g_free (data);
return FALSE;
@@ -217,7 +218,7 @@ object_ready_with_error (gpointer object,
data = g_new0 (ObjectReadyData, 1);
- data->object = object;
+ data->object = _g_object_ref (object);
data->ready_func = ready_func;
data->user_data = user_data;
data->error = error;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]