From 7eeed460046cf8a47a23273bcecc3104f56a7388 Mon Sep 17 00:00:00 2001 From: David Welch Date: Tue, 24 Feb 2004 23:51:04 +0000 Subject: [PATCH] - Avoid a crashing when trying to process an exception early in the boot process. svn path=/trunk/; revision=8361 --- reactos/ntoskrnl/rtl/i386/exception.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/rtl/i386/exception.c b/reactos/ntoskrnl/rtl/i386/exception.c index 85b06dd7383..7e2306aed32 100755 --- a/reactos/ntoskrnl/rtl/i386/exception.c +++ b/reactos/ntoskrnl/rtl/i386/exception.c @@ -1,4 +1,4 @@ -/* $Id: exception.c,v 1.9 2003/12/30 18:52:06 fireball Exp $ +/* $Id: exception.c,v 1.10 2004/02/24 23:51:04 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -165,6 +165,15 @@ RtlpDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, DPRINT("RtlpDispatchException()\n"); + /* + This could be true very early in the boot process + in which case there is no point in continuing. + */ + if (KeGetCurrentThread() == NULL) + { + return ExceptionContinueExecution; + } + #ifndef NDEBUG RtlpDumpExceptionRegistrations(); #endif /* NDEBUG */