diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 4dc779f2bf4..e4beb3a5530 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1720,7 +1720,15 @@ NtSetInformationProcess(IN HANDLE ProcessHandle, process so we're sure we're in the right context! */ KeAttachProcess(&Process->Pcb); - Process->Peb->BeingDebugged = TRUE; + _SEH_TRY + { + Process->Peb->BeingDebugged = TRUE; + } + _SEH_HANDLE + { + DPRINT1("Trying to set the Peb->BeingDebugged field of process 0x%x failed, exception: 0x%x\n", Process, _SEH_GetExceptionCode()); + } + _SEH_END; KeDetachProcess(); } Status = STATUS_SUCCESS;