From b422b8b7b7031dab665aa794de668e7be98fe9eb Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 8 Jul 2021 16:39:20 +0200 Subject: [PATCH] blitter: Abort if the blitter GL context can't be created MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/125 Signed-off-by: Gert Wollny Reviewed-by: Corentin Noël . --- src/vrend_blitter.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vrend_blitter.c b/src/vrend_blitter.c index 569d692..2a0d1da 100644 --- a/src/vrend_blitter.c +++ b/src/vrend_blitter.c @@ -439,6 +439,11 @@ static void vrend_renderer_init_blit_ctx(struct vrend_blitter_ctx *blit_ctx) break; } + if (!blit_ctx->gl_context) { + vrend_printf("virglrenderer: Unable to create blit context"); + abort(); + } + vrend_sync_make_current(blit_ctx->gl_context); glGenVertexArrays(1, &blit_ctx->vaoid); glGenFramebuffers(1, &blit_ctx->fb_id);