[openbox] fix xdg-menu to not crash without icon file (#737112)
Miroslav Lichvar
mlichvar at fedoraproject.org
Mon Oct 10 13:39:53 UTC 2011
commit 32214976a02be8297ae8d8f40f3aef4b53d17820
Author: Ralph Giles <giles at xiph.org>
Date: Mon Oct 10 14:52:52 2011 +0200
fix xdg-menu to not crash without icon file (#737112)
xdg-menu | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/xdg-menu b/xdg-menu
index 71f9026..4f16438 100644
--- a/xdg-menu
+++ b/xdg-menu
@@ -48,7 +48,8 @@ def icon_attr(entry):
if iconinfo:
iconfile = iconinfo.get_filename()
iconinfo.free()
- return ' icon="' + iconfile + '"'
+ if iconfile:
+ return ' icon="' + iconfile + '"'
return ''
def entry_name(entry):
More information about the scm-commits
mailing list