From a91a914a84bd08caf74c4a812254411bf6847aca Mon Sep 17 00:00:00 2001 From: Jeff Woods Date: Mon, 4 Feb 2013 17:36:40 -0800 Subject: [PATCH] Fix crash when generating submenu and application icon doesn't exist. --- src/xdgmenumaker | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xdgmenumaker b/src/xdgmenumaker index 5fec311..2602393 100755 --- a/src/xdgmenumaker +++ b/src/xdgmenumaker @@ -269,7 +269,10 @@ def fluxboxmenu(): spacing = ' ' if seticon == True: app_icon = icon_full_path(applications_icon) - print '[submenu] ('+applications+') <'+app_icon+'>' + if app_icon is None: + print '[submenu] ('+applications+')' + else: + print '[submenu] ('+applications+') <'+app_icon+'>' else: print '[submenu] ('+applications+')' else: @@ -316,6 +319,8 @@ def icewmmenu(): spacing = ' ' if seticon == True: app_icon = icon_full_path(applications_icon) + if app_icon is None: + app_icon = "_none_" print 'menu "'+applications+'" '+app_icon+' {' else: print 'menu "'+applications+'" _none_ {'