Fix ref counting bug

svn path=/trunk/; revision=12749
This commit is contained in:
Gé van Geldorp 2005-01-03 09:46:31 +00:00
parent 91fc5d1804
commit 0f86e212b1

View file

@ -343,6 +343,8 @@ IntFindExistingCurIconObject(PWINSTATION_OBJECT WinStaObject, HMODULE hModule,
{
Object = CONTAINING_RECORD(CurrentEntry, CURICON_OBJECT, ListEntry);
CurrentEntry = CurrentEntry->Flink;
if(NT_SUCCESS(ObmReferenceObjectByPointer(Object, otCursorIcon)))
{
if((Object->hModule == hModule) && (Object->hRsrc == hRsrc))
{
if(cx && ((cx != Object->Size.cx) || (cy != Object->Size.cy)))
@ -359,6 +361,8 @@ IntFindExistingCurIconObject(PWINSTATION_OBJECT WinStaObject, HMODULE hModule,
return Object;
}
}
ObmDereferenceObject(Object);
}
ExReleaseFastMutex(&CurIconListLock);