From 129a05510dbc924c913435dd4726730136291191 Mon Sep 17 00:00:00 2001 From: Oarcinae Date: Tue, 5 Nov 2024 09:08:28 -0500 Subject: [PATCH] Fix #240 crash on gui radio select when main team is disabled. --- changelog.txt | 5 +++++ info.json | 2 +- lib/separate_spawns_guis.lua | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 423d5e2..182c062 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.1.7 +Date: 2024-11-05 + Bugfixes: + - Fix crash when player clicks on team radio select if main team is disabled. +--------------------------------------------------------------------------------------------------- Version: 2.1.6 Date: 2024-11-04 Bugfixes: diff --git a/info.json b/info.json index 04241fd..3cdf374 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "oarc-mod", - "version": "2.1.6", + "version": "2.1.7", "factorio_version": "2.0", "title": "Oarc Multiplayer Spawn", "author": "Oarcinae", diff --git a/lib/separate_spawns_guis.lua b/lib/separate_spawns_guis.lua index 3359a18..434a161 100644 --- a/lib/separate_spawns_guis.lua +++ b/lib/separate_spawns_guis.lua @@ -648,7 +648,9 @@ function SpawnOptsRadioSelect(event) event.element.parent.isolated_spawn_new_team_radio.state = false end elseif (elemName == "isolated_spawn_new_team_radio") then - event.element.parent.isolated_spawn_main_team_radio.state = false + if (event.element.parent.isolated_spawn_main_team_radio ~= nil) then + event.element.parent.isolated_spawn_main_team_radio.state = false + end end elseif (tags.setting == "buddy_team_select") then