mirror of
https://github.com/yawut/SDL.git
synced 2026-04-26 00:57:36 -05:00
Fixed a memory leak in function GL_RenderReadPixels
This commit is contained in:
parent
134f47d9c9
commit
a142da3eef
|
|
@ -1438,6 +1438,7 @@ GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!convert_format(data, temp_format, &internalFormat, &format, &type)) {
|
if (!convert_format(data, temp_format, &internalFormat, &format, &type)) {
|
||||||
|
SDL_free(temp_pixels);
|
||||||
return SDL_SetError("Texture format %s not supported by OpenGL",
|
return SDL_SetError("Texture format %s not supported by OpenGL",
|
||||||
SDL_GetPixelFormatName(temp_format));
|
SDL_GetPixelFormatName(temp_format));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user