From 15fa7f9cd19170d1e02fab79caf93536f8167b20 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 2 Apr 2016 20:53:13 +0200 Subject: [PATCH] GFX_CTL_CHECK_WINDOW - prevent null pointer dereferences --- gfx/video_context_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index 3066be587a..f9613e4b8a 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -269,7 +269,9 @@ bool gfx_ctx_ctl(enum gfx_ctx_ctl_state state, void *data) video_driver_ctl(RARCH_DISPLAY_CTL_GET_FRAME_COUNT, &frame_count); - if (!video_context_data) + if (!video_context_data || !size_data) + return false; + if (!current_video_context || !current_video_context->check_window) return false; current_video_context->check_window(video_context_data,