gdbus:add null check for error variable 72/101172/1
authorsanghyeok.oh <sanghyeok.oh@samsung.com>
Wed, 30 Nov 2016 09:43:21 +0000 (18:43 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 30 Nov 2016 10:33:32 +0000 (02:33 -0800)
Change-Id: Ib51dd62ebc066b9393ae7c59f2f63d3330a16518
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
(cherry picked from commit 22aff71838c2aafc27196886fff317d146f749e1)

gio/gdbusconnection.c

index 92b2948..933a091 100755 (executable)
@@ -6319,6 +6319,8 @@ decode_method_reply (GDBusMessage        *reply,
 
     case G_DBUS_MESSAGE_TYPE_ERROR:
       g_dbus_message_to_gerror (reply, error);
+      if (error == NULL || *error == NULL)
+        break;
       if ((*error)->code == G_DBUS_ERROR_NO_REPLY)
         {
           g_clear_error(error);