GDBusConnection: Avoid dereferencing vtable for unregistered objects

https://bugzilla.gnome.org/show_bug.cgi?id=671988

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
Marco Trevisan (Treviño) 2012-03-19 20:13:24 +01:00 committed by David Zeuthen
parent 617c0cb6a0
commit 322c6e9344

View File

@ -4663,9 +4663,6 @@ call_in_idle_cb (gpointer user_data)
guint registration_id;
guint subtree_registration_id;
vtable = g_object_get_data (G_OBJECT (invocation), "g-dbus-interface-vtable");
g_assert (vtable != NULL && vtable->method_call != NULL);
registration_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (invocation), "g-dbus-registration-id"));
subtree_registration_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (invocation), "g-dbus-subtree-registration-id"));
@ -4684,6 +4681,9 @@ call_in_idle_cb (gpointer user_data)
goto out;
}
vtable = g_object_get_data (G_OBJECT (invocation), "g-dbus-interface-vtable");
g_assert (vtable != NULL && vtable->method_call != NULL);
vtable->method_call (g_dbus_method_invocation_get_connection (invocation),
g_dbus_method_invocation_get_sender (invocation),
g_dbus_method_invocation_get_object_path (invocation),