summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Bacci <luca.bacci982@gmail.com>2023-03-09 14:21:43 +0100
committerPhilip Withnall <pwithnall@endlessos.org>2023-03-10 16:15:21 +0000
commit6d1471815efabe21a11d7db30e751f98e71d9644 (patch)
tree2a3ae3bb493f5da161d07a374d86e6a4edbe8ced
parent0559f4b8b6a73ccc3e0261febb6f7a4d91068ba6 (diff)
downloadglib-6d1471815efabe21a11d7db30e751f98e71d9644.tar.gz
GWin32AppInfo: Add NULL string checks
Fixes #2922
-rw-r--r--gio/gwin32appinfo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gio/gwin32appinfo.c b/gio/gwin32appinfo.c
index 1bfcaf93d..543e18f5d 100644
--- a/gio/gwin32appinfo.c
+++ b/gio/gwin32appinfo.c
@@ -3100,6 +3100,9 @@ link_handlers_to_unregistered_apps (void)
if (handler_verb->app != NULL)
continue;
+ if (handler_verb->executable_folded == NULL)
+ continue;
+
handler_exe_basename = g_utf8_find_basename (handler_verb->executable_folded, -1);
g_hash_table_iter_init (&app_iter, apps_by_id);
@@ -3119,6 +3122,9 @@ link_handlers_to_unregistered_apps (void)
const gchar *app_exe_basename;
app_verb = _verb_idx (app->verbs, ai);
+ if (app_verb->executable_folded == NULL)
+ continue;
+
app_exe_basename = g_utf8_find_basename (app_verb->executable_folded, -1);
/* First check that the executable paths are identical */