Unref message and protect against NULL
authorRoss Burton <ross@openedhand.com>
Wed, 17 Aug 2005 17:30:45 +0000 (17:30 +0000)
committerRoss Burton <ross@openedhand.com>
Wed, 17 Aug 2005 17:30:45 +0000 (17:30 +0000)
ChangeLog
glib/dbus-gproxy.c

index dfceda3..155b773 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-17  Ross Burton  <ross@burtonini.com>
+
+       * glib/dbus-gproxy.c:
+       (dbus_g_proxy_call_no_reply): unref the message once sent.
+       (dbus_g_proxy_call): protect against NULL proxy.
+
 2005-08-16  John (J5) Palmieri  <johnp@redhat.com>
 
        * python/__init__.py: Version updated (0, 43, 0)
index ca1b554..8a68b66 100644 (file)
@@ -2342,6 +2342,9 @@ dbus_g_proxy_call (DBusGProxy        *proxy,
   va_list args;
   GValueArray *in_args;
 
+  g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), FALSE);
+  g_return_val_if_fail (!DBUS_G_PROXY_DESTROYED (proxy), FALSE);
+
   va_start (args, first_arg_type);
 
   DBUS_G_VALUE_ARRAY_COLLECT_ALL (in_args, first_arg_type, args);
@@ -2399,7 +2402,7 @@ dbus_g_proxy_call_no_reply (DBusGProxy               *proxy,
                              message,
                              NULL))
     goto oom;
-
+  dbus_message_unref (message);
   return;
   
  oom: