mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-08 19:28:06 +02:00
lib: Add guard to up_client_get_devices()
This commit is contained in:
parent
d6cbf5c7df
commit
3769776e12
1 changed files with 5 additions and 1 deletions
|
|
@ -90,7 +90,11 @@ G_DEFINE_TYPE_WITH_CODE (UpClient, up_client, G_TYPE_OBJECT,
|
|||
GPtrArray *
|
||||
up_client_get_devices (UpClient *client)
|
||||
{
|
||||
GPtrArray *array = up_client_get_devices2 (client);
|
||||
GPtrArray *array;
|
||||
|
||||
g_return_val_if_fail (UP_IS_CLIENT (client), NULL);
|
||||
|
||||
array = up_client_get_devices2 (client);
|
||||
g_ptr_array_set_free_func (array, NULL);
|
||||
return array;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue