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):