From 3c700a80d1e9f37778a3805d3ef1ec89c2e9763e Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Thu, 10 Apr 2014 01:25:18 +0300 Subject: [PATCH] Check if there is selected item at all. --- client/client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/client.c b/client/client.c index 1c30498..2b2bb68 100644 --- a/client/client.c +++ b/client/client.c @@ -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);