Fixed cursor resource leak in Windows (thanks Huib-Jan Imbens!)
authorSam Lantinga <slouken@libsdl.org>
Sat, 05 Oct 2002 05:46:32 +0000
changeset 506 f097dba83975
parent 505 6b34c9dcf74c
child 507 7853b6af5957
Fixed cursor resource leak in Windows (thanks Huib-Jan Imbens!)
src/video/wincommon/SDL_sysmouse.c
--- a/src/video/wincommon/SDL_sysmouse.c	Sat Oct 05 05:44:09 2002 +0000
+++ b/src/video/wincommon/SDL_sysmouse.c	Sat Oct 05 05:46:32 2002 +0000
@@ -95,6 +95,8 @@
 void WIN_FreeWMCursor(_THIS, WMcursor *cursor)
 {
 #ifndef USE_STATIC_CURSOR
+	if ( cursor->curs == GetCursor() )
+		SetCursor(NULL);
 	if ( cursor->curs != NULL )
 		DestroyCursor(cursor->curs);
 	if ( cursor->ands != NULL )