mirror of https://github.com/encounter/SDL.git
Fix memory leak in VITA_GXM_CreateRenderer
This commit is contained in:
parent
e17f0c283c
commit
69bbe4ce7d
|
@ -269,8 +269,6 @@ VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||||
renderer->driverdata = data;
|
renderer->driverdata = data;
|
||||||
renderer->window = window;
|
renderer->window = window;
|
||||||
|
|
||||||
if (data->initialized != SDL_FALSE)
|
|
||||||
return 0;
|
|
||||||
data->initialized = SDL_TRUE;
|
data->initialized = SDL_TRUE;
|
||||||
|
|
||||||
if (flags & SDL_RENDERER_PRESENTVSYNC) {
|
if (flags & SDL_RENDERER_PRESENTVSYNC) {
|
||||||
|
@ -286,6 +284,8 @@ VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||||
|
|
||||||
if (gxm_init(renderer) != 0)
|
if (gxm_init(renderer) != 0)
|
||||||
{
|
{
|
||||||
|
SDL_free(data);
|
||||||
|
SDL_free(renderer);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue