Commit e414561a authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

msvcrt: Fix crash when rethrowing after a non-C++ exception on x86_64.

parent 90cc0942
...@@ -579,14 +579,14 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame, ...@@ -579,14 +579,14 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
return ExceptionContinueSearch; return ExceptionContinueSearch;
} }
if (rec->ExceptionCode == CXX_EXCEPTION) if (rec->ExceptionCode == CXX_EXCEPTION &&
{ (!rec->ExceptionInformation[1] && !rec->ExceptionInformation[2]))
if (!rec->ExceptionInformation[1] && !rec->ExceptionInformation[2])
{ {
TRACE("rethrow detected.\n"); TRACE("rethrow detected.\n");
*rec = *msvcrt_get_thread_data()->exc_record; *rec = *msvcrt_get_thread_data()->exc_record;
} }
if (rec->ExceptionCode == CXX_EXCEPTION)
{
exc_type = (cxx_exception_type *)rec->ExceptionInformation[2]; exc_type = (cxx_exception_type *)rec->ExceptionInformation[2];
if (TRACE_ON(seh)) if (TRACE_ON(seh))
......
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