diff --git a/modules/ChatPopup/control.lua b/modules/ChatPopup/control.lua index c22c1564..6ab99fd3 100644 --- a/modules/ChatPopup/control.lua +++ b/modules/ChatPopup/control.lua @@ -32,6 +32,7 @@ function ChatPopup.sendFlyingText(player, text) end script.on_event(defines.events.on_console_chat, function(event) + if not event.player_index then return end local player = game.players[event.player_index] if not player then return end if not event.message then return end