summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c
index 03b66623c..91f3aaffb 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c
@@ -188,6 +188,7 @@ Returns:
//
// For now, allocate an arbitrarily long buffer
//
+ BufferLen = 0;
Buffer = EfiLibAllocateZeroPool (0x10000);
if (Buffer == NULL) {
return 0;
@@ -428,14 +429,15 @@ Returns:
Handle = gST->ConsoleOutHandle;
+ GraphicsOutput = NULL;
+ UgaDraw = NULL;
Status = gBS->HandleProtocol (
Handle,
&gEfiGraphicsOutputProtocolGuid,
(VOID**)&GraphicsOutput
);
- UgaDraw = NULL;
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (GraphicsOutput == NULL)) {
GraphicsOutput = NULL;
Status = gBS->HandleProtocol (