mirror of
https://github.com/celisej567/source-engine.git
synced 2025-12-31 21:48:22 +03:00
game(client): fix crash on linux/window in touch, fix memory leak in touch
This commit is contained in:
@@ -505,8 +505,11 @@ void CTouchControls::CreateAtlasTexture()
|
||||
rectCount++;
|
||||
}
|
||||
|
||||
if( !textureList.Count() )
|
||||
if( !textureList.Count() || rectCount == 0 )
|
||||
{
|
||||
free(rects);
|
||||
return;
|
||||
}
|
||||
|
||||
int atlasHeight = nextPowerOfTwo(sqrt((double)atlasSize));
|
||||
int sizeInBytes = atlasHeight*atlasHeight*4;
|
||||
|
||||
Reference in New Issue
Block a user