[glib: 1/2] GWin32AppInfo: Remove assertion on the opened registry key
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] GWin32AppInfo: Remove assertion on the opened registry key
- Date: Mon, 1 Nov 2021 10:41:32 +0000 (UTC)
commit 0460e78bc657dda5e69d09cbaeea2676a19af8f2
Author: Luca Bacci <luca bacci982 gmail com>
Date: Tue Sep 21 16:09:23 2021 +0200
GWin32AppInfo: Remove assertion on the opened registry key
Relax assertion about opened registry key as it may have been removed
in the meantime between enumeration and when opening, or (more likely)
we may not have the required permissions to open the some enumerated
keys (i.e. RegOpenKeyExW fails and returns ERROR_ACCESS_DENIED).
Fixes https://gitlab.com/inkscape/inbox/-/issues/5669
gio/gwin32appinfo.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gio/gwin32appinfo.c b/gio/gwin32appinfo.c
index 3468dfee0..cafd053b4 100644
--- a/gio/gwin32appinfo.c
+++ b/gio/gwin32appinfo.c
@@ -983,7 +983,10 @@ get_verbs (GWin32RegistryKey *program_id_key,
name,
NULL);
- g_assert (subkey != NULL);
+ /* We may not have the required access rights to open the child key */
+ if (subkey == NULL)
+ continue;
+
/* The key we're looking at is "<some_root>/Shell/<this_key>",
* where "Shell" is verbshell_prefix.
* If it has a value named 'Subcommands' (doesn't matter what its data is),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]