mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-15 07:00:05 -05:00
pipewire: fix error message if the DBus library load failed
If the handle is NULL, we'd print out the strerror with res at whatever value it currently has, leading to confusion.
This commit is contained in:
parent
5ac456f294
commit
12379a9a3c
1 changed files with 5 additions and 4 deletions
|
|
@ -459,8 +459,9 @@ struct pw_context *pw_context_new(struct pw_loop *main_loop,
|
|||
SPA_NAME_SUPPORT_DBUS, NULL,
|
||||
n_support, this->support);
|
||||
|
||||
if (impl->dbus_handle == NULL ||
|
||||
(res = spa_handle_get_interface(impl->dbus_handle,
|
||||
if (impl->dbus_handle == NULL) {
|
||||
pw_log_warn("%p: can't load dbus library: %s", this, lib);
|
||||
} else if ((res = spa_handle_get_interface(impl->dbus_handle,
|
||||
SPA_TYPE_INTERFACE_DBus, &dbus_iface)) < 0) {
|
||||
pw_log_warn("%p: can't load dbus interface: %s", this, spa_strerror(res));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue