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,6 +114,8 @@ int main(int argc, char **argv)
if (status == BM_RUN_RESULT_SELECTED) { if (status == BM_RUN_RESULT_SELECTED) {
bmItem *item = bmMenuGetSelectedItem(menu); bmItem *item = bmMenuGetSelectedItem(menu);
if (item)
printf("%s\n", bmItemGetText(item)); printf("%s\n", bmItemGetText(item));
} }