From 757f0692adca840129159535ab6467d26f144e46 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 3 Dec 2015 23:59:54 +0100 Subject: [PATCH] (gfx_ctx_swap_buffers) Guard against video context data being NULL --- gfx/video_context_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index 6679c4d39b..93fe75ef9a 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -167,6 +167,8 @@ bool gfx_ctx_get_video_output_next(void *data) void gfx_ctx_swap_buffers(void *data) { + if (!current_video_context) + return; if (current_video_context->swap_buffers) current_video_context->swap_buffers(data); }