summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-29 07:10:16 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-29 07:10:16 +0000
commit73e4adbe6852905b72a34055b7019e081e395410 (patch)
treea87417e4ac4bef27ba8984040c44ebbf1af66dcb /MdeModulePkg
parentca9d3a9dedfc5f19d574f29bae062e9bef33bb99 (diff)
downloadedk2-platforms-73e4adbe6852905b72a34055b7019e081e395410.tar.xz
fixed potential NULL pointer reference issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7146 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsConsole.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c b/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
index d923804e3f..3d7758d790 100644
--- a/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
+++ b/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
@@ -309,7 +309,7 @@ BdsLibConnectAllConsoles (
&HandleCount,
&HandleBuffer
);
-
+
for (Index = 0; Index < HandleCount; Index++) {
gBS->HandleProtocol (
HandleBuffer[Index],
@@ -416,7 +416,7 @@ BdsLibConnectAllDefaultConsoles (
@param PixelHeight Height of GopBlt/BmpImage in pixels
@param PixelWidth Width of GopBlt/BmpImage in pixels
- @retval EFI_SUCCESS GopBlt and GopBltSize are returned.
+ @retval EFI_SUCCESS GopBlt and GopBltSize are returned.
@retval EFI_UNSUPPORTED BmpImage is not a valid *.BMP image
@retval EFI_BUFFER_TOO_SMALL The passed in GopBlt buffer is not big enough.
GopBltSize will contain the required size.
@@ -587,7 +587,7 @@ ConvertBmpToGopBlt (
/**
- Use Console Control Protocol to lock the Console In Spliter virtual handle.
+ Use Console Control Protocol to lock the Console In Spliter virtual handle.
This is the ConInHandle and ConIn handle in the EFI system table. All key
presses will be ignored until the Password is typed in. The only way to
disable the password is to type it in to a ConIn device.
@@ -691,7 +691,8 @@ EnableQuietBoot (
if (GraphicsOutput != NULL) {
SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
- } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
+
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
Status = UgaDraw->GetMode (UgaDraw, &SizeOfX, &SizeOfY, &ColorDepth, &RefreshRate);
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
@@ -835,7 +836,7 @@ EnableQuietBoot (
Height,
Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
);
- } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
Status = UgaDraw->Blt (
UgaDraw,
(EFI_UGA_PIXEL *) Blt,
@@ -869,7 +870,7 @@ EnableQuietBoot (
}
/**
- Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
+ Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
Simple Text Out screens will now be synced up with all non UGA output devices
@retval EFI_SUCCESS UGA devices are back in text mode and synced up.