From 38a7338592c02c1a9f5a190a65616bcf41fcc768 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 6 Dec 2015 11:22:16 +0100 Subject: [PATCH] Fix video_shader_driver_get_current_shader --- gfx/video_shader_driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gfx/video_shader_driver.c b/gfx/video_shader_driver.c index bffd839329..f29d63dcd1 100644 --- a/gfx/video_shader_driver.c +++ b/gfx/video_shader_driver.c @@ -74,12 +74,13 @@ const shader_backend_t *shader_ctx_init_first(void) struct video_shader *video_shader_driver_get_current_shader(void) { + void *video_driver = video_driver_get_ptr(false); const video_poke_interface_t *video_poke = video_driver_get_poke(); - if (!video_poke) + if (!video_poke || !video_driver) return NULL; if (!video_poke->get_current_shader) return NULL; - return video_poke->get_current_shader(shader_data); + return video_poke->get_current_shader(video_driver); } void video_shader_scale(unsigned idx,