testcustomcursor: plug memory leak
This commit is contained in:
committed by
Anonymous Maarten
parent
2cd84bd581
commit
e79cfbe520
@@ -304,7 +304,12 @@ static SDL_Cursor *init_animated_cursor(const char *image[], bool oneshot)
|
|||||||
frame_count = 6;
|
frame_count = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
return SDL_CreateAnimatedCursor(frames, frame_count, hot_x, hot_y);
|
SDL_Cursor *cursor = SDL_CreateAnimatedCursor(frames, frame_count, hot_x, hot_y);
|
||||||
|
|
||||||
|
SDL_DestroySurface(surface);
|
||||||
|
SDL_DestroySurface(invsurface);
|
||||||
|
|
||||||
|
return cursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDLTest_CommonState *state;
|
static SDLTest_CommonState *state;
|
||||||
|
|||||||
Reference in New Issue
Block a user