diff --git a/src/group_gui.cpp b/src/group_gui.cpp --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -780,6 +780,8 @@ static const WindowDesc _group_desc = { void ShowPlayerGroup(PlayerID player, VehicleType vehicle_type) { + if (!IsValidPlayer(player)) return; + WindowClass wc; switch (vehicle_type) {