X-Git-Url: https://code.delx.au/refind/blobdiff_plain/cff588e1b33df1c292b3ae11a880e89092221b5f..add96ff8057d0c03026395992d9ecde081c8dca7:/refind/screen.c diff --git a/refind/screen.c b/refind/screen.c index 49c7a94..29d11c8 100644 --- a/refind/screen.c +++ b/refind/screen.c @@ -34,7 +34,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * Modifications copyright (c) 2012 Roderick W. Smith + * Modifications copyright (c) 2012-2014 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), a copy of which must be distributed @@ -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()).