mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +00:00
menu_common_shader_manager_set_preset - handle possible null pointer
dereference
This commit is contained in:
parent
9bb044a79b
commit
5a2d59d0e3
@ -2725,7 +2725,7 @@ static void menu_common_shader_manager_set_preset(struct gfx_shader *shader, uns
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
RARCH_LOG("Setting Menu shader: %s.\n", cgp_path ? cgp_path : "N/A (stock)");
|
||||
|
||||
if (video_set_shader_func((enum rarch_shader_type)type, cgp_path))
|
||||
if (driver.video->set_shader && video_set_shader_func((enum rarch_shader_type)type, cgp_path))
|
||||
{
|
||||
// Makes sure that we use Menu CGP shader on driver reinit.
|
||||
// Only do this when the cgp actually works to avoid potential errors.
|
||||
|
Loading…
x
Reference in New Issue
Block a user