mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-04 07:10:26 +01:00
config: only shutdown libhal if the connection is valid.
Thanks to libdbus' extensive use of assert we won't just get an error, it'll
bring the whole server down for us.
(cherry picked from commit fb07fab2c0)
This commit is contained in:
parent
2cb0ebec2b
commit
f0ba770716
1 changed files with 7 additions and 5 deletions
12
config/hal.c
12
config/hal.c
|
|
@ -283,12 +283,14 @@ disconnect_hook(void *data)
|
|||
struct config_hal_info *info = data;
|
||||
|
||||
if (info->hal_ctx) {
|
||||
dbus_error_init(&error);
|
||||
if (!libhal_ctx_shutdown(info->hal_ctx, &error))
|
||||
DebugF("[config/hal] couldn't shut down context: %s (%s)\n",
|
||||
error.name, error.message);
|
||||
if (dbus_connection_get_is_connected(info->system_bus)) {
|
||||
dbus_error_init(&error);
|
||||
if (!libhal_ctx_shutdown(info->hal_ctx, &error))
|
||||
DebugF("[config/hal] couldn't shut down context: %s (%s)\n",
|
||||
error.name, error.message);
|
||||
dbus_error_free(&error);
|
||||
}
|
||||
libhal_ctx_free(info->hal_ctx);
|
||||
dbus_error_free(&error);
|
||||
}
|
||||
|
||||
info->hal_ctx = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue