]> code.delx.au - refind/blobdiff - refind/screen.c
Misc. changes, mostly to fix minor or rare bugs.
[refind] / refind / screen.c
index 655057f2df022cc78c8e33b8683545c9fa6140d7..29d11c80b4582bddd504e522a8517a35416ab616 100644 (file)
@@ -572,12 +572,14 @@ VOID BltImageCompositeBadge(IN EG_IMAGE *BaseImage, IN EG_IMAGE *TopImage, IN EG
      }
 
      // blit to screen and clean up
-     if (CompImage->HasAlpha)
-        egDrawImageWithTransparency(CompImage, NULL, XPos, YPos, CompImage->Width, CompImage->Height);
-     else
-        egDrawImage(CompImage, XPos, YPos);
-     egFreeImage(CompImage);
-     GraphicsScreenDirty = TRUE;
+     if (CompImage != NULL) {
+         if (CompImage->HasAlpha)
+             egDrawImageWithTransparency(CompImage, NULL, XPos, YPos, CompImage->Width, CompImage->Height);
+         else
+             egDrawImage(CompImage, XPos, YPos);
+         egFreeImage(CompImage);
+         GraphicsScreenDirty = TRUE;
+     }
 }
 
 // Line-editing functions borrowed from gummiboot (cursor_left(), cursor_right(), & line_edit()).