From 81cd2f536ef0097392b51f96405321ce7b01350c Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Thu, 26 Jun 2014 01:38:46 +0000 Subject: Refine code to make it more safely. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15593 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/Shell.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ShellPkg/Application/Shell/Shell.c') diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index 4abeafcd44..2f1e3eb65c 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -509,6 +509,7 @@ UefiMain ( // Reset page break back to default. // ShellInfoObject.PageBreakEnabled = PcdGetBool(PcdShellPageBreakDefault); + ASSERT (ShellInfoObject.ConsoleInfo != NULL); ShellInfoObject.ConsoleInfo->Enabled = TRUE; ShellInfoObject.ConsoleInfo->RowCounter = 0; @@ -2091,6 +2092,7 @@ ProcessCommandLineToFinal( if (EFI_ERROR(Status)) { return (Status); } + ASSERT (*CmdLine != NULL); TrimSpaces(CmdLine); -- cgit v1.2.3