diff --git a/ShellPkg/Application/Shell/ConsoleWrappers.c b/ShellPkg/Application/Shell/ConsoleWrappers.c index 38491216f3..49ba6e90e7 100644 --- a/ShellPkg/Application/Shell/ConsoleWrappers.c +++ b/ShellPkg/Application/Shell/ConsoleWrappers.c @@ -255,7 +255,9 @@ FileBasedSimpleTextOutQueryMode ( OUT UINTN *Rows ) { - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *PassThruProtocol = ((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *)This)->OriginalSimpleTextOut; + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *PassThruProtocol; + + PassThruProtocol = ((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *)This)->OriginalSimpleTextOut; // Pass the QueryMode call thru to the original SimpleTextOutProtocol return (PassThruProtocol->QueryMode(