Commit a60785a4 authored by Mike Gorse's avatar Mike Gorse

Warn if a device listener returns a non-bool, rather than crash

parent e44de649
......@@ -389,6 +389,11 @@ _atspi_dbus_handle_DeviceEvent (DBusConnection *bus, DBusMessage *message, void
if (klass->device_event)
{
retval = (*klass->device_event) (listener, &event);
if (retval != 0 && retval != 1)
{
g_warning ("at-spi: device event handler returned %d; should be 0 or 1", retval);
retval = 0;
}
}
done:
reply = dbus_message_new_method_return (message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment