From f18cf1064d717e707b91ad9ee192da903f6b8d68 Mon Sep 17 00:00:00 2001 From: Lion4ever Date: Thu, 1 Sep 2016 14:49:08 +0200 Subject: [PATCH] fix for multiplayer death crash help_item can be nil and may not be indexed then --- homeworld_logic.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeworld_logic.lua b/homeworld_logic.lua index de0cf01..891dd64 100644 --- a/homeworld_logic.lua +++ b/homeworld_logic.lua @@ -318,7 +318,7 @@ function Homeworld:tick( tick ) for player_index = 1, #game.players do local player = game.players[player_index] local held_item = player.cursor_stack - local holding_pda = (held_item.valid_for_read and held_item.name == pda_name) + local holding_pda = (held_item and held_item.valid_for_read and held_item.name == pda_name) if self.state.using_pda[player_index] and not holding_pda then self.state.using_pda[player_index] = nil self:hide_gui(player_index)