Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

Commit

Permalink
Adds some safety code to protect against errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BadgerCode committed Jun 9, 2021
1 parent dde6a2b commit 6b37a22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/autorun/client/cl_scoreboard_voicesliders.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ hook.Add("TTTScoreboardColumns","TTTScoreboardMenuVoiceSliders", function(pnl)
-- Wait for the scoreboard to finish adding the mute (voice) button, before trying to modify it
-- We have to wait for the panel's player to be set too
timer.Simple(2, function()
if pnl.voice == nil then return end

pnl.voice.DoRightClick = function()
local rowPlayer = pnl:GetPlayer()
if (rowPlayer == LocalPlayer() or not IsValid(rowPlayer)) then return end
Expand Down

0 comments on commit 6b37a22

Please sign in to comment.