[Fix] Segfault if not checking for player when displaying small_menu.

This commit is contained in:
Allanis 2013-09-12 15:34:10 +01:00
parent 584f56e2a0
commit 687ed47839

View File

@ -150,7 +150,8 @@ static void menu_main_exit(char* str) {
/* Ze ingame menu. */
/* Small ingame menu. */
void menu_small(void) {
if(player_isFlag(PLAYER_DESTROYED) || pilot_isFlag(player, PILOT_DEAD) ||
if((player == NULL) player_isFlag(PLAYER_DESTROYED)
|| pilot_isFlag(player, PILOT_DEAD) ||
(menu_isOpen(MENU_MAIN) ||
menu_isOpen(MENU_SMALL) ||
menu_isOpen(MENU_DEATH)))