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
9 changes: 7 additions & 2 deletions LuaUI/Widgets/api_apm_stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ local function SendMyPlayerStats()
APM = round(NC*60/activeTime),
}
--If sending own stats, we need to clear previous set incase we have left the game and come back
WG.AddPlayerStatsToPanel(playerStats)
-- the panel widget can already be gone during Shutdown; the stats are still sent below
if WG.AddPlayerStatsToPanel then
WG.AddPlayerStatsToPanel(playerStats)
end
MP = VFS.PackU16(MP)
MC = VFS.PackU16(MC)
KP = VFS.PackU16(KP)
Expand Down Expand Up @@ -108,7 +111,9 @@ local function ProcessPlayerStats(msg, playerID)
KPM = round(KP*60/activeTime),
APM = round(NC*60/activeTime),
}
WG.AddPlayerStatsToPanel(playerStats)
if WG.AddPlayerStatsToPanel then
WG.AddPlayerStatsToPanel(playerStats)
end
end
end

Expand Down