diff --git a/ba/ba0100.cpp b/ba/ba0100.cpp index 20b3a0aa9..829d92559 100755 --- a/ba/ba0100.cpp +++ b/ba/ba0100.cpp @@ -1665,7 +1665,8 @@ void TMenu_application::update_preferred_tree() if (sm != NULL) { const int num = node.get_int(1); - pref->add(new TMenuitem(sm->item(num))); + if (num < sm->items()) + pref->add(new TMenuitem(sm->item(num))); } } }