Mercurial > sdl-ios-xcode
comparison src/video/wincommon/SDL_sysmouse.c @ 506:f097dba83975
Fixed cursor resource leak in Windows (thanks Huib-Jan Imbens!)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 05 Oct 2002 05:46:32 +0000 |
parents | e8157fcb3114 |
children | 5c74ac147358 |
comparison
equal
deleted
inserted
replaced
505:6b34c9dcf74c | 506:f097dba83975 |
---|---|
93 #endif /* !USE_STATIC_CURSOR */ | 93 #endif /* !USE_STATIC_CURSOR */ |
94 | 94 |
95 void WIN_FreeWMCursor(_THIS, WMcursor *cursor) | 95 void WIN_FreeWMCursor(_THIS, WMcursor *cursor) |
96 { | 96 { |
97 #ifndef USE_STATIC_CURSOR | 97 #ifndef USE_STATIC_CURSOR |
98 if ( cursor->curs == GetCursor() ) | |
99 SetCursor(NULL); | |
98 if ( cursor->curs != NULL ) | 100 if ( cursor->curs != NULL ) |
99 DestroyCursor(cursor->curs); | 101 DestroyCursor(cursor->curs); |
100 if ( cursor->ands != NULL ) | 102 if ( cursor->ands != NULL ) |
101 free(cursor->ands); | 103 free(cursor->ands); |
102 if ( cursor->xors != NULL ) | 104 if ( cursor->xors != NULL ) |