From: Piotr Caban piotr@codeweavers.com
--- dlls/msvcp90/exception.c | 4 +--- dlls/msvcp90/msvcp90.h | 1 + dlls/msvcrt/exception_ptr.c | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/msvcp90/exception.c b/dlls/msvcp90/exception.c index 015d6e85da6..02b57de3ca8 100644 --- a/dlls/msvcp90/exception.c +++ b/dlls/msvcp90/exception.c @@ -1264,11 +1264,9 @@ void __cdecl __ExceptionPtrDestroy(exception_ptr *ep) { if (ep->rec->ExceptionCode == CXX_EXCEPTION) { - const cxx_exception_type *type = (void*)ep->rec->ExceptionInformation[2]; void *obj = (void*)ep->rec->ExceptionInformation[1]; - uintptr_t base = cxx_rva_base( type );
- if (type && type->destructor) call_dtor( cxx_rva(type->destructor, base), obj ); + __DestructExceptionObject(ep->rec); HeapFree(GetProcessHeap(), 0, obj); }
diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index 7a4964712ec..97cd59952b4 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -733,6 +733,7 @@ static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, cons #define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) )) #endif
+void CDECL __DestructExceptionObject(EXCEPTION_RECORD*); void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*); void __cdecl DECLSPEC_NORETURN _Xinvalid_argument(const char*); void __cdecl DECLSPEC_NORETURN _Xlength_error(const char*); diff --git a/dlls/msvcrt/exception_ptr.c b/dlls/msvcrt/exception_ptr.c index dd2c6b0ac5c..383d16166aa 100644 --- a/dlls/msvcrt/exception_ptr.c +++ b/dlls/msvcrt/exception_ptr.c @@ -81,11 +81,9 @@ void __cdecl __ExceptionPtrDestroy(exception_ptr *ep) { if (ep->rec->ExceptionCode == CXX_EXCEPTION) { - const cxx_exception_type *type = (void*)ep->rec->ExceptionInformation[2]; void *obj = (void*)ep->rec->ExceptionInformation[1]; - uintptr_t base = cxx_rva_base( type );
- if (type && type->destructor) call_dtor( cxx_rva(type->destructor, base), obj ); + __DestructExceptionObject(ep->rec); HeapFree(GetProcessHeap(), 0, obj); }