diff options
Diffstat (limited to 'glib/test-thread-server.c')
-rw-r--r-- | glib/test-thread-server.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/glib/test-thread-server.c b/glib/test-thread-server.c index a92febf3..00044a79 100644 --- a/glib/test-thread-server.c +++ b/glib/test-thread-server.c @@ -27,7 +27,7 @@ thread_test_data_free (ThreadTestData *data) static DBusMessageHandler *disconnect_handler; static DBusMessageHandler *filter_handler; -static int handler_slot; +static dbus_int32_t handler_slot = -1; static DBusHandlerResult handle_test_message (DBusMessageHandler *handler, @@ -222,7 +222,8 @@ main (int argc, char *argv[]) return 1; } - handler_slot = dbus_connection_allocate_data_slot (); + if (!dbus_connection_allocate_data_slot (&handler_slot)) + g_error ("no memory for data slot"); filter_handler = dbus_message_handler_new (handle_filter, NULL, NULL); |