mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-05 16:58:07 +02:00
Merge branch 'kate/fix-null-error' into 'master'
Draft: libupower-glib: up-client: Fix crash when printing the error message from a NULL GError pointer See merge request upower/upower!304
This commit is contained in:
commit
38aa7e8902
1 changed files with 9 additions and 1 deletions
|
|
@ -106,7 +106,15 @@ up_client_get_devices_full (UpClient *client,
|
|||
GPtrArray *array;
|
||||
guint i;
|
||||
|
||||
g_return_val_if_fail (UP_IS_CLIENT (client), NULL);
|
||||
if (!UP_IS_CLIENT (client)) {
|
||||
g_set_error (error, G_IO_ERROR,
|
||||
G_IO_ERROR_INVALID_ARGUMENT,
|
||||
"Invalid UpClient object");
|
||||
g_return_if_fail_warning (G_LOG_DOMAIN,
|
||||
G_STRFUNC,
|
||||
"UP_IS_CLIENT (client)");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (up_exported_daemon_call_enumerate_devices_sync (client->priv->proxy,
|
||||
&devices,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue