Fix crash when created menu results in a nil object... who knows when that could happen, right!?

master
Icedream 2015-04-23 22:22:49 +02:00
parent 449bd8e2db
commit 37f9747e03
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ local function PlayTaunt(sound)
end end
local function Apply(menu, taunts) local function Apply(menu, taunts)
if not IsValid(menu) then return end
-- sort sounds -- sort sounds
local sounds = {} local sounds = {}
for key,value in pairs(taunts.sounds) do for key,value in pairs(taunts.sounds) do