Fixed bug when opening the context menu with no active tool.

This commit is contained in:
Thirteen 2018-09-16 00:02:06 +01:00
parent 9e658726fc
commit f1d307d377

View File

@ -71,7 +71,10 @@ if CLIENT then
local shouldGlow = false
hook.Add( "OnContextMenuOpen", "Advanced Bone Tool", function()
shouldGlow = ( LocalPlayer():GetTool().Name == "Advanced Bone Tool" )
local tool = LocalPlayer():GetTool()
if ( IsValid( tool ) ) then
shouldGlow = ( tool.Name == "Advanced Bone Tool" )
end
end )
hook.Add( "OnContextMenuClose", "Advanced Bone Tool", function()