diff --git a/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrCommon.c b/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrCommon.c index 9bc82f16b7..a13a3525f1 100644 --- a/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrCommon.c +++ b/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrCommon.c @@ -443,6 +443,10 @@ ExtractDataFromHiiHandle ( SizeOfNvStore = 0; CachedStart = 0; + if (DefaultImage == NULL || Guid == NULL) { + return EFI_INVALID_PARAMETER; + } + Status = GetHiiInterface (&Hii); if (EFI_ERROR (Status)) { return Status; diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c index dbb648da50..20ad068962 100644 --- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c +++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c @@ -393,7 +393,7 @@ InternalPrintGraphic ( if (GraphicsOutput != NULL) { HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution; VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution; - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { + } else if (UgaDraw != NULL) { UgaDraw->GetMode (UgaDraw, &HorizontalResolution, &VerticalResolution, &ColorDepth, &RefreshRate); } else { Status = EFI_UNSUPPORTED; @@ -466,8 +466,7 @@ InternalPrintGraphic ( NULL ); - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - ASSERT (UgaDraw!= NULL); + } else if (UgaDraw != NULL) { Blt->Image.Bitmap = AllocateZeroPool (Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); ASSERT (Blt->Image.Bitmap != NULL);