X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fntoskrnl%2Fke%2Fexcept.c;h=b994d0775852a7073156262a23f2351edeed0efb;hp=ab348755f5ac40f7084926c0b2befbd3a16fc52c;hb=592824076618aceca7581ba9ed253811a6448a2c;hpb=5f18dde52776e5629b5bcb2daef67ac37f37c06a;ds=sidebyside diff --git a/reactos/ntoskrnl/ke/except.c b/reactos/ntoskrnl/ke/except.c index ab348755f5a..b994d077585 100644 --- a/reactos/ntoskrnl/ke/except.c +++ b/reactos/ntoskrnl/ke/except.c @@ -143,24 +143,22 @@ KiRaiseException(IN PEXCEPTION_RECORD ExceptionRecord, Status = _SEH_GetExceptionCode(); } _SEH_END; + if (!NT_SUCCESS(Status)) return Status; - /* Make sure we didn't crash in SEH */ - if (NT_SUCCESS(Status)) - { - /* Convert the context record */ - KeContextToTrapFrame(Context, - ExceptionFrame, - TrapFrame, - Context->ContextFlags, - PreviousMode); - - /* Dispatch the exception */ - KiDispatchException(ExceptionRecord, - ExceptionFrame, - TrapFrame, - PreviousMode, - SearchFrames); - } + /* Convert the context record */ + KeContextToTrapFrame(Context, + ExceptionFrame, + TrapFrame, + Context->ContextFlags, + PreviousMode); + + /* Dispatch the exception */ + ExceptionRecord->ExceptionCode &= ~KI_EXCEPTION_INTERNAL; + KiDispatchException(ExceptionRecord, + ExceptionFrame, + TrapFrame, + PreviousMode, + SearchFrames); /* Return the status */ return Status;