Lazily fix static deinitialization fiasco

This commit is contained in:
Siana Gearz
2013-01-27 01:43:38 +01:00
parent aed472af77
commit 7755033017

View File

@@ -779,8 +779,12 @@ void LLStat::init()
LLStat::stat_map_t& LLStat::getStatList() LLStat::stat_map_t& LLStat::getStatList()
{ {
static LLStat::stat_map_t stat_list; static LLStat::stat_map_t* stat_list = NULL;
return stat_list; if(!stat_list)
{
stat_list = new LLStat::stat_map_t();
}
return *stat_list;
} }
LLStat::LLStat(const U32 num_bins, const BOOL use_frame_timer) LLStat::LLStat(const U32 num_bins, const BOOL use_frame_timer)