aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stand/common/gfx_fb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c
index 9942c629d124..67f757983cd3 100644
--- a/stand/common/gfx_fb.c
+++ b/stand/common/gfx_fb.c
@@ -83,6 +83,7 @@
*/
#include <sys/param.h>
+#include <assert.h>
#include <stand.h>
#include <teken.h>
#include <gfx_fb.h>
@@ -783,7 +784,7 @@ gfxfb_blt(void *BltBuffer, GFXFB_BLT_OPERATION BltOperation,
int rv;
#if defined(EFI)
EFI_STATUS status;
- EFI_GRAPHICS_OUTPUT *gop = gfx_state.tg_private;
+ EFI_GRAPHICS_OUTPUT *gop;
EFI_TPL tpl;
/*
@@ -793,7 +794,9 @@ gfxfb_blt(void *BltBuffer, GFXFB_BLT_OPERATION BltOperation,
* done as they are provided by protocols that disappear when exit
* boot services.
*/
- if (gop != NULL && boot_services_active) {
+ if (gfx_state.tg_fb_type == FB_GOP && boot_services_active) {
+ assert(gfx_state.tg_private != NULL);
+ gop = gfx_state.tg_private;
tpl = BS->RaiseTPL(TPL_NOTIFY);
switch (BltOperation) {
case GfxFbBltVideoFill: