Fix possible crash in network splitscreen lobby

This commit is contained in:
Benau 2018-03-22 11:42:40 +08:00
parent 152dfe7c55
commit e9c956b357

View File

@ -816,7 +816,7 @@ EventPropagation EventHandler::onGUIEvent(const SEvent& event)
const int playerID = input_manager->getPlayerKeyboardID();
if (input_manager->masterPlayerOnly() && playerID != PLAYER_ID_GAME_MASTER) break;
if (!w->isFocusedForPlayer(playerID)) w->setFocusForPlayer(playerID);
if (playerID != -1 && !w->isFocusedForPlayer(playerID)) w->setFocusForPlayer(playerID);
break;
}