diff --git a/source/components/parser/psparse.c b/source/components/parser/psparse.c index ef9e7fedf..b25228a50 100644 --- a/source/components/parser/psparse.c +++ b/source/components/parser/psparse.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: psparse - Parser top level AML parse routines - * $Revision: 1.116 $ + * $Revision: 1.118 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. * All rights reserved. * * 2. License @@ -288,6 +288,13 @@ AcpiPsCompleteThisOp ( FUNCTION_TRACE_PTR ("PsCompleteThisOp", Op); + /* Check for null Op, can happen if AML code is corrupt */ + + if (!Op) + { + return_VALUE (TRUE); + } + /* Delete this op and the subtree below it if asked to */ if (((WalkState->ParseFlags & ACPI_PARSE_TREE_MASK) == ACPI_PARSE_DELETE_TREE) && @@ -1018,7 +1025,7 @@ CloseThisOp: AcpiPsCompleteThisOp (WalkState, Op); Op = NULL; - + Status = AE_OK; break; @@ -1188,7 +1195,7 @@ AcpiPsParseAml ( WalkState->Thread = Thread; AcpiDsPushWalkState (WalkState, Thread); - /* + /* * This global allows the AML debugger to get a handle to the currently * executing control method. */