mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
ratbagd: ignore NULL profiles
Never return information about non-existant profiles. Just skip NULL profiles silently, when iterating. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
@@ -74,7 +74,7 @@ static int ratbagd_device_find_profile(sd_bus *bus,
|
||||
if (r < 0)
|
||||
return 0;
|
||||
|
||||
if (index >= device->n_profiles)
|
||||
if (index >= device->n_profiles || !device->profiles[index])
|
||||
return 0;
|
||||
|
||||
*found = device->profiles[index];
|
||||
|
||||
Reference in New Issue
Block a user