db04183b9d
bnc#727253 OBS-URL: https://build.opensuse.org/request/show/89792 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-menus?expand=0&rev=90
28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
commit fbabc41cb6f2c6520f9f117137fa296a7f8340f3
|
|
Author: Florian Müllner <fmuellner@gnome.org>
|
|
Date: Fri Oct 21 19:57:55 2011 +0200
|
|
|
|
libmenu: Ignore invalid desktop entries
|
|
|
|
Both "Name" and "Exec" are mandatory keys according to the desktop
|
|
entry spec; some .desktop files missing one or the other have been
|
|
spotted in the while, so ignore them explicitly.
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=662409
|
|
|
|
diff --git a/libmenu/desktop-entries.c b/libmenu/desktop-entries.c
|
|
index bb6076d..a8c13d9 100644
|
|
--- a/libmenu/desktop-entries.c
|
|
+++ b/libmenu/desktop-entries.c
|
|
@@ -256,7 +256,9 @@ desktop_entry_load (DesktopEntry *entry)
|
|
const char *categories_str;
|
|
|
|
entry_desktop->appinfo = g_desktop_app_info_new_from_filename (entry->path);
|
|
- if (!entry_desktop->appinfo)
|
|
+ if (!entry_desktop->appinfo ||
|
|
+ !g_app_info_get_name (G_APP_INFO (entry_desktop->appinfo)) ||
|
|
+ !g_app_info_get_executable (G_APP_INFO (entry_desktop->appinfo)))
|
|
{
|
|
menu_verbose ("Failed to load \"%s\"\n", entry->path);
|
|
return FALSE;
|