Add the missing check for NULL pointer before use it.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10116 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1174,6 +1174,7 @@ ParseOpCodes (
|
||||
//
|
||||
if (CurrentExpression == NULL && MapScopeDepth > 0) {
|
||||
CurrentExpression = CreateExpression (CurrentForm);
|
||||
ASSERT (MapExpressionList != NULL);
|
||||
InsertTailList (MapExpressionList, &CurrentExpression->Link);
|
||||
if (Scope == 0) {
|
||||
SingleOpCodeExpression = TRUE;
|
||||
@ -2120,6 +2121,7 @@ ParseOpCodes (
|
||||
//
|
||||
Status = PopCurrentExpression ((VOID **) &CurrentExpression);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT (MapScopeDepth > 0);
|
||||
MapScopeDepth --;
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user