Caching pointers to Lua objects - don't!

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,728
Location
Near Portsmouth, UK
From ProductionPopup.lua (hotfix 1.0.3.70 change)

Code:
-- NOTE: Storing the PlayerID/CityID for the city, it is not safe to store the pointer to a city
--       over multiple frames, the city could get removed by the game core thread
local g_currentCityOwnerID = -1;
local g_currentCityID = -1;
 
Back
Top Bottom