From 0d625716bc5b50060c27dec00f61cfb1b397f68f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 5 Apr 2011 14:58:53 +0100 Subject: [PATCH 02/15] dbus-gobject: check for NULL when producing messages --- dbus/dbus-gobject.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index fcd9ee0..284b575 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -1628,7 +1628,7 @@ invoke_object_method (GObject *object, { g_free (in_signature); g_array_free (types_array, TRUE); - reply = dbus_message_new_error (message, "org.freedesktop.DBus.GLib.ErrorError", error->message); + reply = error_or_die (message, "org.freedesktop.DBus.GLib.ErrorError", error->message); dbus_connection_send (connection, reply, NULL); dbus_message_unref (reply); g_error_free (error); @@ -2970,7 +2970,7 @@ dbus_g_method_get_sender (DBusGMethodInvocation *context) DBusMessage * dbus_g_method_get_reply (DBusGMethodInvocation *context) { - return dbus_message_new_method_return (dbus_g_message_get_message (context->message)); + return reply_or_die (dbus_g_message_get_message (context->message)); } /** @@ -3017,7 +3017,7 @@ dbus_g_method_return (DBusGMethodInvocation *context, ...) if (!context->send_reply) goto out; - reply = dbus_message_new_method_return (dbus_g_message_get_message (context->message)); + reply = dbus_g_method_get_reply (context); out_sig = method_output_signature_from_object_info (context->object, context->method); argsig = _dbus_gtypes_from_arg_signature (out_sig, FALSE); -- 1.7.4.1