msvcrt: Handle non c++ exceptions in __DestructExceptionObject.

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:25 +01:00 committed by Alexandre Julliard
parent 8fda75fe4a
commit 856f0f9d13
1 changed files with 9 additions and 0 deletions

View File

@ -400,6 +400,15 @@ void CDECL __DestructExceptionObject(EXCEPTION_RECORD *rec)
TRACE("(%p)\n", rec); TRACE("(%p)\n", rec);
if (rec->ExceptionCode != CXX_EXCEPTION) return;
#ifndef __x86_64__
if (rec->NumberParameters != 3) return;
#else
if (rec->NumberParameters != 4) return;
#endif
if (rec->ExceptionInformation[0] < CXX_FRAME_MAGIC_VC6 ||
rec->ExceptionInformation[0] > CXX_FRAME_MAGIC_VC8) return;
if (!info || !info->destructor) if (!info || !info->destructor)
return; return;