build-export: Avoid segfault if Exec line is missing from desktop file

This commit is contained in:
Danilo Bargen
2022-03-22 10:42:13 +01:00
committed by Alexander Larsson
parent 53a0b528bf
commit 6dbc097ac5

View File

@@ -500,12 +500,14 @@ check_refs:
g_print (_("WARNING: Can't find Exec key in %s: %s\n"), path, local_error->message);
g_clear_error (&local_error);
}
else
{
argv = g_strsplit (command, " ", 0);
argv = g_strsplit (command, " ", 0);
bin_file = convert_app_absolute_path (argv[0], files);
if (!g_file_query_exists (bin_file, NULL))
g_print (_("WARNING: Binary not found for Exec line in %s: %s\n"), path, command);
bin_file = convert_app_absolute_path (argv[0], files);
if (!g_file_query_exists (bin_file, NULL))
g_print (_("WARNING: Binary not found for Exec line in %s: %s\n"), path, command);
}
*icon = g_key_file_get_string (key_file,
G_KEY_FILE_DESKTOP_GROUP,