mirror of https://github.com/encounter/SDL.git
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)) {
|
||||
SDL_free(temp_pixels);
|
||||
return SDL_SetError("Texture format %s not supported by OpenGL",
|
||||
SDL_GetPixelFormatName(temp_format));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue