[gnome-software/wip/temp/ubuntu-xenial-rebased: 121/326] Fix crash	due to reference disappearing
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased: 121/326] Fix crash	due to reference disappearing
- Date: Fri, 29 Apr 2016 09:57:30 +0000 (UTC)
commit df8b6fe437f59ba911618f83fd217f1bb7c48a75
Author: William Hua <william hua canonical com>
Date:   Tue Mar 1 08:58:32 2016 -0500
    Fix crash due to reference disappearing
    
    We need to steal the reference since it's a g_autoptr.
 src/plugins/gs-plugin-ubuntu-reviews.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-ubuntu-reviews.c b/src/plugins/gs-plugin-ubuntu-reviews.c
index 27758b2..478752c 100644
--- a/src/plugins/gs-plugin-ubuntu-reviews.c
+++ b/src/plugins/gs-plugin-ubuntu-reviews.c
@@ -773,7 +773,7 @@ send_review_request (GsPlugin *plugin, const gchar *method, const gchar *path, J
                if (!json_parser_load_from_data (parser, msg->response_body->data, -1, error)) {
                        return FALSE;
                }
-               *result = parser;
+               *result = g_steal_pointer (&parser);
        }
 
        return TRUE;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]