Check if there is selected item at all.

This commit is contained in:
Jari Vetoniemi 2014-04-10 01:25:18 +03:00
parent c25af3e377
commit 3c700a80d1

View File

@ -114,7 +114,9 @@ int main(int argc, char **argv)
if (status == BM_RUN_RESULT_SELECTED) {
bmItem *item = bmMenuGetSelectedItem(menu);
printf("%s\n", bmItemGetText(item));
if (item)
printf("%s\n", bmItemGetText(item));
}
bmMenuFree(menu);