Louis-Philippe Gagnon (of Macadamian for Corel)
Search for already loaded CursorIcon was done with the wrong handle, so it was leaking icons. Fixed.
This commit is contained in:
parent
c107f714d0
commit
b4c68726d9
|
@ -739,11 +739,6 @@ HGLOBAL CURSORICON_Load( HINSTANCE hInstance, LPCWSTR name,
|
||||||
fCursor ? RT_GROUP_CURSORW : RT_GROUP_ICONW )))
|
fCursor ? RT_GROUP_CURSORW : RT_GROUP_ICONW )))
|
||||||
return 0;
|
return 0;
|
||||||
hGroupRsrc = hRsrc;
|
hGroupRsrc = hRsrc;
|
||||||
/* If shared icon, check whether it was already loaded */
|
|
||||||
|
|
||||||
if ( (loadflags & LR_SHARED)
|
|
||||||
&& (h = CURSORICON_FindSharedIcon( hInstance, hRsrc ) ) != 0 )
|
|
||||||
return h;
|
|
||||||
|
|
||||||
/* Find the best entry in the directory */
|
/* Find the best entry in the directory */
|
||||||
|
|
||||||
|
@ -764,6 +759,12 @@ HGLOBAL CURSORICON_Load( HINSTANCE hInstance, LPCWSTR name,
|
||||||
|
|
||||||
if (!(hRsrc = FindResourceW(hInstance,MAKEINTRESOURCEW(wResId),
|
if (!(hRsrc = FindResourceW(hInstance,MAKEINTRESOURCEW(wResId),
|
||||||
fCursor ? RT_CURSORW : RT_ICONW ))) return 0;
|
fCursor ? RT_CURSORW : RT_ICONW ))) return 0;
|
||||||
|
|
||||||
|
/* If shared icon, check whether it was already loaded */
|
||||||
|
if ( (loadflags & LR_SHARED)
|
||||||
|
&& (h = CURSORICON_FindSharedIcon( hInstance, hRsrc ) ) != 0 )
|
||||||
|
return h;
|
||||||
|
|
||||||
if (!(handle = LoadResource( hInstance, hRsrc ))) return 0;
|
if (!(handle = LoadResource( hInstance, hRsrc ))) return 0;
|
||||||
bits = (LPBYTE)LockResource( handle );
|
bits = (LPBYTE)LockResource( handle );
|
||||||
h = CURSORICON_CreateFromResource( 0, 0, bits, dwBytesInRes,
|
h = CURSORICON_CreateFromResource( 0, 0, bits, dwBytesInRes,
|
||||||
|
|
Loading…
Reference in New Issue