From 37f9747e033b89e942ffe6b52e888a8da62566c4 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 23 Apr 2015 22:22:49 +0200 Subject: [PATCH] Fix crash when created menu results in a nil object... who knows when that could happen, right!? --- lua/autorun/client/prophunt_tauntmenu.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/autorun/client/prophunt_tauntmenu.lua b/lua/autorun/client/prophunt_tauntmenu.lua index 6a6dcfe..715272b 100644 --- a/lua/autorun/client/prophunt_tauntmenu.lua +++ b/lua/autorun/client/prophunt_tauntmenu.lua @@ -50,6 +50,8 @@ local function PlayTaunt(sound) end local function Apply(menu, taunts) + if not IsValid(menu) then return end + -- sort sounds local sounds = {} for key,value in pairs(taunts.sounds) do