From 1af95cab8a341625e9aa4ac144c8982f3975f92d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 5 Oct 2002 05:46:32 +0000 Subject: [PATCH] Fixed cursor resource leak in Windows (thanks Huib-Jan Imbens!) --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40507 --- src/video/wincommon/SDL_sysmouse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video/wincommon/SDL_sysmouse.c b/src/video/wincommon/SDL_sysmouse.c index 219bbff26..3314273a3 100644 --- a/src/video/wincommon/SDL_sysmouse.c +++ b/src/video/wincommon/SDL_sysmouse.c @@ -95,6 +95,8 @@ static void memxor(Uint8 *dst, Uint8 *src1, Uint8 *src2, int len) 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 )