Skip to content

Commit 4304820

Browse files
committed
Do not output (null) for missing icons
1 parent ebb8240 commit 4304820

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ print_app_to_buffer(struct app *app, GString *submenu)
9292
g_string_append_printf(submenu, " <item label=\"%s\"",
9393
app->name_localized ? app->name_localized : app->name);
9494
if (show_icons) {
95-
g_string_append_printf(submenu, " icon=\"%s\"", app->icon);
95+
g_string_append_printf(submenu, " icon=\"%s\"", app->icon ? app->icon : "");
9696
}
9797
g_string_append_printf(submenu, ">\n");
9898

@@ -208,7 +208,7 @@ print_menu(GList *dirs, GList *apps)
208208

209209
printf(" <menu id=\"%s\" label=\"%s\"", dir->name, dir->name_localized ? : dir->name);
210210
if (show_icons) {
211-
printf(" icon=\"%s\"", dir->icon);
211+
printf(" icon=\"%s\"", dir->icon ? dir->icon : "");
212212
}
213213
printf(">\n");
214214

0 commit comments

Comments
 (0)