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