user32: Only call the driver DestroyCursorIcon entry point for valid handles.

This commit is contained in:
Alexandre Julliard 2010-04-26 14:44:00 -05:00
parent 94a3c0987e
commit bfc4c71049
1 changed files with 1 additions and 3 deletions

View File

@ -172,6 +172,7 @@ static BOOL free_icon_handle( HICON handle )
ULONG_PTR param = obj->param;
HeapFree( GetProcessHeap(), 0, obj );
if (wow_handlers.free_icon_param && param) wow_handlers.free_icon_param( param );
USER_Driver->pDestroyCursorIcon( handle );
return TRUE;
}
return FALSE;
@ -1561,10 +1562,7 @@ BOOL WINAPI DestroyIcon( HICON hIcon )
TRACE_(icon)("%p\n", hIcon );
if (CURSORICON_DelSharedIcon( hIcon ) == -1)
{
USER_Driver->pDestroyCursorIcon( hIcon );
free_icon_handle( hIcon );
}
return TRUE;
}