mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-04-29 16:39:38 +03:00
Merge pull request #381 from Nbc66/develop
Fixed "color_correction_volume" crash caused by dangling pointers inside of ccmngr
This commit is contained in:
commit
471ffb419d
@ -157,6 +157,22 @@ void CColorCorrectionMgr::CommitColorCorrectionWeights()
|
|||||||
}
|
}
|
||||||
m_colorCorrectionWeights.RemoveAll();
|
m_colorCorrectionWeights.RemoveAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CColorCorrectionMgr::LevelShutdownPreEntity()
|
||||||
|
{
|
||||||
|
//Clean up the vectors when shuting down a level
|
||||||
|
//will keep dangling pointers inside of the vector causing a nullptr crash
|
||||||
|
if (g_ColorCorrectionVolumeList.Base())
|
||||||
|
{
|
||||||
|
g_ColorCorrectionVolumeList.Purge();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_ColorCorrectionList.Base())
|
||||||
|
{
|
||||||
|
g_ColorCorrectionList.Purge();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
void CColorCorrectionMgr::SetColorCorrectionWeight( ClientCCHandle_t h, float flWeight )
|
void CColorCorrectionMgr::SetColorCorrectionWeight( ClientCCHandle_t h, float flWeight )
|
||||||
{
|
{
|
||||||
|
@ -76,6 +76,8 @@ private:
|
|||||||
CUtlVector< SetWeightParams_t > m_colorCorrectionWeights;
|
CUtlVector< SetWeightParams_t > m_colorCorrectionWeights;
|
||||||
|
|
||||||
void CommitColorCorrectionWeights();
|
void CommitColorCorrectionWeights();
|
||||||
|
|
||||||
|
void LevelShutdownPreEntity();
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user