Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions [admin]/admin2/client/widgets/admin_stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function aPlayerStats(player)
end

function aPlayerStatsClose(destroy)
if ((destroy) or (guiCheckBoxGetSelected(aPerformanceStats))) then
if ((destroy) or (isElement(aPerformanceStats) and guiCheckBoxGetSelected(aPerformanceStats))) then
if (aStatsForm) then
removeEventHandler("onClientGUIClick", aStatsForm, aClientStatsClick)
removeEventHandler("onClientGUIChanged", aStatsForm, aClientStatsChanged)
Expand All @@ -87,7 +87,9 @@ function aPlayerStatsClose(destroy)
aStatsForm = nil
end
else
guiSetVisible(aStatsForm, false)
if (aStatsForm) then
guiSetVisible(aStatsForm, false)
end
end
end

Expand Down