msvcrt: Destroy thrown c++ object before calling handler in _except_handler4_common.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2016-03-18 12:40:33 +01:00 committed by Alexandre Julliard
parent 856f0f9d13
commit 4a397b4009
2 changed files with 3 additions and 0 deletions

View File

@ -950,6 +950,8 @@ int CDECL _except_handler4_common( ULONG *cookie, void (*check_cookie)(void),
if (retval == EXCEPTION_EXECUTE_HANDLER)
{
__DestructExceptionObject(rec);
/* Unwind all higher frames, this one will handle the exception */
_global_unwind2((EXCEPTION_REGISTRATION_RECORD*)frame);
msvcrt_local_unwind4( cookie, frame, trylevel, &frame->_ebp );

View File

@ -219,6 +219,7 @@ typedef struct
BOOL __cdecl __CxxRegisterExceptionObject(EXCEPTION_RECORD**, cxx_frame_info*);
void __cdecl __CxxUnregisterExceptionObject(cxx_frame_info*, BOOL);
void CDECL __DestructExceptionObject(EXCEPTION_RECORD*);
/* TLS data */
extern DWORD msvcrt_tls_index DECLSPEC_HIDDEN;