msvcr120: Fix exception object refcounting in __ExceptionPtrAssign.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2017-07-13 19:15:06 +02:00 committed by Alexandre Julliard
parent f9b881e30c
commit ab313dd3be
1 changed files with 5 additions and 0 deletions

View File

@ -1773,7 +1773,12 @@ void __cdecl __ExceptionPtrAssign(exception_ptr *ep, const exception_ptr *assign
TRACE("(%p %p)\n", ep, assign);
/* don't destroy object stored in ep */
if (ep->ref)
InterlockedDecrement(ep->ref);
*ep = *assign;
if (ep->ref)
InterlockedIncrement(ep->ref);
}
/*********************************************************************