Skip to content

Commit

Permalink
fixed exceptions on random wire message when round ended beforehands
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgraeffe committed Nov 6, 2024
1 parent f6424cb commit a10953c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LuckyDefusePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public override void Load(bool hotReload)
AddTimer(Config.PlanterMenuDuration, () =>
{
_planterMenu.Close();
if (_wireChosenManually) return;
if (_wireChosenManually || _planter == null) return;
_planter.PrintToChat(Localizer["randomWireChosen"].Value.Replace("{wire}", $"{_chatColors[_wire]}{_colors[_wire].Name.ToLower()}"));
}, TimerFlags.STOP_ON_MAPCHANGE);
return HookResult.Continue;
Expand Down

0 comments on commit a10953c

Please sign in to comment.