Commit 9484481c authored by Francis Beaudet's avatar Francis Beaudet Committed by Alexandre Julliard

Fixed a reference-counting problem in the external lock mechanism.

parent 81d8613a
...@@ -1586,13 +1586,20 @@ static void COM_ExternalLockAddRef( ...@@ -1586,13 +1586,20 @@ static void COM_ExternalLockAddRef(
{ {
COM_ExternalLock *externalLock = COM_ExternalLockFind(pUnk); COM_ExternalLock *externalLock = COM_ExternalLockFind(pUnk);
/*
* Add an external lock to the object. If it was already externally
* locked, just increase the reference count. If it was not.
* add the item to the list.
*/
if ( externalLock == EL_NOT_FOUND ) if ( externalLock == EL_NOT_FOUND )
COM_ExternalLockInsert(pUnk); COM_ExternalLockInsert(pUnk);
else else
{ externalLock->uRefCount++;
externalLock->uRefCount++; /* add an external lock */
IUnknown_AddRef(pUnk); /* add a local lock as well */ /*
} * Add an internal lock to the object
*/
IUnknown_AddRef(pUnk);
} }
/**************************************************************************** /****************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment