mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
don't seg on menus with no items
This commit is contained in:
parent
3ae15803fa
commit
5450fdb692
1 changed files with 3 additions and 1 deletions
|
@ -392,7 +392,6 @@ Menu_Draw (void)
|
|||
return;
|
||||
}
|
||||
|
||||
item = menu->items[menu->cur_item];
|
||||
|
||||
for (m_pic = menu->pics; m_pic; m_pic = m_pic->next) {
|
||||
qpic_t *pic = Draw_CachePic (m_pic->name, 1);
|
||||
|
@ -406,6 +405,9 @@ Menu_Draw (void)
|
|||
menu->items[i]->text);
|
||||
}
|
||||
}
|
||||
if (!menu->items)
|
||||
return;
|
||||
item = menu->items[menu->cur_item];
|
||||
if (menu->cursor) {
|
||||
G_INT (&menu_pr_state, OFS_PARM0) = item->x;
|
||||
G_INT (&menu_pr_state, OFS_PARM1) = item->y;
|
||||
|
|
Loading…
Reference in a new issue