mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Fixed a memory leak in function GL_RenderReadPixels
This commit is contained in:
parent
fed9b60492
commit
564c790f33
@ -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