Don't lose the icon surface if it's freed immediately after SDL_WM_SetIcon()
authorSam Lantinga <slouken@libsdl.org>
Sun, 14 Aug 2011 21:57:50 -0400
changeset 5612 41f033e6f311
parent 5611 d20007078cd1
child 5613 f35b76e5b520
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
--- a/src/SDL_compat.c	Sun Aug 14 17:21:21 2011 -0400
+++ b/src/SDL_compat.c	Sun Aug 14 21:57:50 2011 -0400
@@ -821,6 +821,7 @@
 SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask)
 {
     SDL_VideoIcon = icon;
+    ++SDL_VideoIcon->refcount;
 }
 
 int