Update code to avoid using potential NULL pointer.

Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14999 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong 2013-12-18 03:02:52 +00:00 committed by ydong10
parent e7831c9070
commit 5fdd2a818b

View File

@ -2366,7 +2366,7 @@ ParseOpCodes (
//
// Parent statement end tag found, update ParentStatement info.
//
if (IsStatementOpCode(ScopeOpCode) && ParentStatement->Operand == ScopeOpCode) {
if (IsStatementOpCode(ScopeOpCode) && (ParentStatement != NULL) && (ParentStatement->Operand == ScopeOpCode)) {
ParentStatement = ParentStatement->ParentStatement;
}