mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-09 04:31:18 +00:00
trivial: Fix critical warning when policykit rules are not installed
This commit is contained in:
parent
0075a98b51
commit
2d744f5571
@ -622,16 +622,18 @@ fu_main_check_authorization_cb (GObject *source, GAsyncResult *res, gpointer use
|
||||
{
|
||||
FuMainAuthHelper *helper = (FuMainAuthHelper *) user_data;
|
||||
g_autoptr(GError) error = NULL;
|
||||
g_autoptr(GError) error_local = NULL;
|
||||
g_autoptr(PolkitAuthorizationResult) auth = NULL;
|
||||
|
||||
/* get result */
|
||||
auth = polkit_authority_check_authorization_finish (POLKIT_AUTHORITY (source),
|
||||
res, &error);
|
||||
res, &error_local);
|
||||
if (auth == NULL) {
|
||||
g_set_error (&error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_AUTH_FAILED,
|
||||
"could not check for auth: %s", error->message);
|
||||
"could not check for auth: %s",
|
||||
error_local->message);
|
||||
fu_main_invocation_return_error (helper->priv, helper->invocation, error);
|
||||
fu_main_helper_free (helper);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user