Skip to content

Commit e1598d9

Browse files
committed
Fix segfault on missing category
1 parent 046fa21 commit e1598d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ print_apps_for_one_directory(GList *apps, struct dir *dir, GString *submenu)
109109
* dir->categories often contains a semi-colon at the end,
110110
* giving an empty field which we ignore
111111
*/
112-
if (app->categories[0] == '\0') {
112+
if (!app->categories || app->categories[0] == '\0') {
113113
continue;
114114
}
115115

0 commit comments

Comments
 (0)