[client/common] fixes for issues detected through static analysis.

This commit is contained in:
Geoffrey McRae 2022-03-07 10:13:54 +11:00
parent a3820536ab
commit 3a8cb6a613
18 changed files with 228 additions and 24 deletions

View file

@ -327,7 +327,14 @@ bool opengl_onMouseShape(LG_Renderer * renderer, const LG_RendererCursor cursor,
{
if (this->mouseData)
free(this->mouseData);
this->mouseData = malloc(size);
this->mouseData = malloc(size);
if (!this->mouseData)
{
DEBUG_ERROR("out of memory");
return false;
}
this->mouseDataSize = size;
}