colorpicker.cpp -
change to
The crash happens because CreateNewTextureID(true) is called every time the code runs, creating a new texture ID repeatedly. This can eventually exhaust or corrupt the Surface texture resources, causing the game to crash.
C++:
texture = g_csgo.m_surface->CreateNewTextureID( true );
change to
C++:
if ( !texture )
texture = g_csgo.m_surface->CreateNewTextureID( true );
The crash happens because CreateNewTextureID(true) is called every time the code runs, creating a new texture ID repeatedly. This can eventually exhaust or corrupt the Surface texture resources, causing the game to crash.