summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/polkitbackend/polkitbackendjsauthority.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.c b/src/polkitbackend/polkitbackendjsauthority.c
index 3eeca21..0dd9548 100644
--- a/src/polkitbackend/polkitbackendjsauthority.c
+++ b/src/polkitbackend/polkitbackendjsauthority.c
@@ -1188,20 +1188,20 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
goto out;
}
- if (!JSVAL_IS_STRING (rval) && !JSVAL_IS_NULL (rval))
+ if (JSVAL_IS_NULL (rval))
{
- g_warning ("Expected a string");
+ /* this fine, means there was no match, use implicit authorizations */
+ good = TRUE;
goto out;
}
- ret_jsstr = JSVAL_TO_STRING (rval);
- if (ret_jsstr == NULL)
+ if (!JSVAL_IS_STRING (rval))
{
- /* this fine, means there was no match, use implicit authorizations */
- good = TRUE;
+ g_warning ("Expected a string");
goto out;
}
+ ret_jsstr = JSVAL_TO_STRING (rval);
ret_utf16 = JS_GetStringCharsZ (authority->priv->cx, ret_jsstr);
ret_str = g_utf16_to_utf8 (ret_utf16, -1, NULL, NULL, &error);
if (ret_str == NULL)