mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
bluez5: handle missing device and adapter in quirks
When the device or adapter is NULL, skip the quirk checks instead of crashing. Fixes https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/155
This commit is contained in:
parent
3666c4810e
commit
140c8d0cd9
1 changed files with 2 additions and 2 deletions
|
|
@ -332,7 +332,7 @@ int spa_bt_quirks_get_features(const struct spa_bt_quirks *this,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Adapter */
|
/* Adapter */
|
||||||
if (this->adapter_rules) {
|
if (this->adapter_rules && adapter) {
|
||||||
uint32_t no_features = 0;
|
uint32_t no_features = 0;
|
||||||
int nitems = 0;
|
int nitems = 0;
|
||||||
char vendor_id[64], product_id[64], address[64];
|
char vendor_id[64], product_id[64], address[64];
|
||||||
|
|
@ -357,7 +357,7 @@ int spa_bt_quirks_get_features(const struct spa_bt_quirks *this,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Device */
|
/* Device */
|
||||||
if (this->device_rules) {
|
if (this->device_rules && device) {
|
||||||
uint32_t no_features = 0;
|
uint32_t no_features = 0;
|
||||||
int nitems = 0;
|
int nitems = 0;
|
||||||
char vendor_id[64], product_id[64], version_id[64], address[64];
|
char vendor_id[64], product_id[64], version_id[64], address[64];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue