]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
Refine code to make it more safely.
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / Image.c
index efa5bbb71b8b5e3002bd3bc819abfeca2198fbf6..ed0cf83c483df72df9eb348dedb5880111f858cf 100644 (file)
@@ -2,7 +2,7 @@
 Implementation for EFI_HII_IMAGE_PROTOCOL.\r
 \r
 \r
-Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1237,6 +1237,7 @@ HiiDrawImage (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
+  FontInfo = NULL;\r
   ImageIn = (EFI_IMAGE_INPUT *) Image;\r
 \r
   //\r
@@ -1383,6 +1384,7 @@ HiiDrawImage (
       FreePool (ImageOut);\r
       return Status;\r
     }\r
+    ASSERT (FontInfo != NULL);\r
     for (Index = 0; Index < Width * Height; Index++) {\r
       BltBuffer[Index] = FontInfo->BackgroundColor;\r
     }\r