From f60d3a845af21b0bb9ed28c62936d3a9be61e354 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 14 Aug 2011 21:57:50 -0400 Subject: [PATCH] Don't lose the icon surface if it's freed immediately after SDL_WM_SetIcon() This is a memory leak, but we don't have a good place to free the icon surface a the moment. --- src/SDL_compat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SDL_compat.c b/src/SDL_compat.c index 013dd22b1..dd23b9cec 100644 --- a/src/SDL_compat.c +++ b/src/SDL_compat.c @@ -821,6 +821,7 @@ void SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask) { SDL_VideoIcon = icon; + ++SDL_VideoIcon->refcount; } int