diff -pur dbus-glib-0.74/dbus/dbus-gproxy.c dbus-glib-0.74.new/dbus/dbus-gproxy.c --- dbus-glib-0.74/dbus/dbus-gproxy.c 2007-04-20 19:36:09.000000000 +0300 +++ dbus-glib-0.74.new/dbus/dbus-gproxy.c 2007-10-19 16:43:34.990501168 +0300 @@ -2167,7 +2167,11 @@ dbus_g_proxy_begin_call_internal (DBusGP timeout)) goto oom; dbus_message_unref (message); - g_assert (pending != NULL); + if (pending == NULL) + { + g_debug ("Disconnected"); + return 0; + } call_id = ++priv->call_id_counter; @@ -2526,8 +2530,18 @@ dbus_g_proxy_call (DBusGProxy *pr g_value_array_free (in_args); - first_arg_type = va_arg (args, GType); - ret = dbus_g_proxy_end_call_internal (proxy, call_id, error, first_arg_type, args); + if (call_id > 0) + { + first_arg_type = va_arg (args, GType); + ret = dbus_g_proxy_end_call_internal (proxy, call_id, error, first_arg_type, args); + } + else + { + g_set_error (error, DBUS_GERROR, + DBUS_GERROR_FAILED, + _("Disconnection or out-of-memory")); + ret = FALSE; + } va_end (args);