X-Git-Url: https://code.delx.au/refind/blobdiff_plain/c8883302f06e69a8b961280b73e29b4b09cacb9d..4944145c8979880d164195efcd9dae809c5bbf7e:/refind/screen.c diff --git a/refind/screen.c b/refind/screen.c index 655057f..29d11c8 100644 --- a/refind/screen.c +++ b/refind/screen.c @@ -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()).