fixed amb806 - menus with no items caused halt

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401351
This commit is contained in:
David Anderson 2007-08-17 20:28:19 +00:00
parent eb6ede7cef
commit c6c5540457

View File

@ -262,7 +262,7 @@ IMenuPanel *MenuManager::RenderMenu(int client, menu_states_t &md, ItemOrder ord
*/
unsigned int i = startItem;
unsigned int foundItems = 0;
while (true)
while (totalItems)
{
ItemDrawInfo &dr = drawItems[foundItems].draw;
/* Is the item valid? */