Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed a memory leak in function GL_RenderReadPixels
  • Loading branch information
kratz00 committed Oct 11, 2016
1 parent fed9b60 commit 564c790
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/render/opengl/SDL_render_gl.c
Expand Up @@ -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));
}
Expand Down

0 comments on commit 564c790

Please sign in to comment.