}
// 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()).