Skip to content

Commit

Permalink
fix gmod menu break
Browse files Browse the repository at this point in the history
  • Loading branch information
klen-list committed Jan 4, 2023
1 parent fefeea9 commit 2bc2d95
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lua/derma/derma.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local vgui_GetControlTable = vgui.GetControlTable
local debug_getregistry = debug.getregistry
local vgui_Register = vgui.Register
local gamemode_Call = gamemode.Call
local gamemode = gamemode
local setmetatable = setmetatable
local table_insert = table.insert
local table_Copy = table.Copy
Expand Down Expand Up @@ -146,14 +146,16 @@ end
Returns 'Default' Skin
-----------------------------------------------------------]]
do
local call_name = "ForceDermaSkin"
function GetDefaultSkin()
local skinname = gamemode_Call( call_name )
if (skinname == nil) then
return DefaultSkin
local skin = nil

if gamemode then
local skinname = gamemode.Call("ForceDermaSkin")
if skinname then
skin = GetNamedSkin( skinname )
end
end

local skin = GetNamedSkin( skinname )
if (skin == nil) then
return DefaultSkin
end
Expand Down

0 comments on commit 2bc2d95

Please sign in to comment.