[gdk-pixbuf] Use g_simple_async_result_take_error()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] Use g_simple_async_result_take_error()
- Date: Mon, 13 Dec 2010 13:26:07 +0000 (UTC)
commit d1d3e5275d1280825bddd5cc1e62a63a3e2e61d6
Author: Bastien Nocera <hadess hadess net>
Date: Mon Dec 13 13:25:38 2010 +0000
Use g_simple_async_result_take_error()
Where it makes sense. Spotted by Christian Persch.
https://bugzilla.gnome.org/show_bug.cgi?id=575900
gdk-pixbuf/gdk-pixbuf-io.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 0f0004e..b5e6c4d 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -1471,8 +1471,7 @@ new_from_stream_thread (GSimpleAsyncResult *result,
/* Set the new pixbuf as the result, or error out */
if (pixbuf == NULL) {
- g_simple_async_result_set_from_error (result, error);
- g_error_free (error);
+ g_simple_async_result_take_error (result, error);
} else {
g_simple_async_result_set_op_res_gpointer (result, g_object_ref (pixbuf), g_object_unref);
}
@@ -2635,8 +2634,7 @@ save_to_stream_thread (GSimpleAsyncResult *result,
/* Set the new pixbuf as the result, or error out */
if (retval == FALSE) {
- g_simple_async_result_set_from_error (result, error);
- g_error_free (error);
+ g_simple_async_result_take_error (result, error);
} else {
g_simple_async_result_set_op_res_gboolean (result, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]