}
if (!dbus_message_append_args_valist (message, first_arg_type, args)) {
- g_warning ("Can not create call message");
+ g_warning ("Can not create call message!");
goto error;
}
goto error;
}
+ /* If we got a NULL pending, that means the connection was disconnected,
+ * and we need to aboout this call
+ * https://bugs.freedesktop.org/show_bug.cgi?id=12675
+ */
+ if (pendingcall == 0) {
+ g_warning ("Connection is breaken!");
+ goto error;
+ }
+
if (!dbus_pending_call_set_notify (pendingcall, notify_function,
user_data, free_function)) {
g_warning ("Out of memory!");