Merge branch 'up_client_null_deref' into 'master'

Fix NULL pointer bug in up_client_get_devices2()

See merge request upower/upower!296
This commit is contained in:
Mathias Krause 2026-01-23 02:37:20 +00:00
commit 19b5cbdb1f

View file

@ -150,7 +150,7 @@ up_client_get_devices2 (UpClient *client)
ret = up_client_get_devices_full (client, NULL, &error);
if (!ret) {
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("up_client_get_devices failed: %s", error->message);
return NULL;
}