mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
Don't crash if Cg is init with NULL.
This commit is contained in:
parent
7111558359
commit
7a20cfa79c
7
gfx/gl.c
7
gfx/gl.c
@ -291,7 +291,7 @@ static bool gl_shader_init(void *data)
|
||||
|
||||
#ifdef HAVE_CG
|
||||
case RARCH_SHADER_CG:
|
||||
backend = &gl_cg_backend;
|
||||
backend = &gl_cg_backend;
|
||||
if (*g_settings.video.cg_shader_path)
|
||||
shader_path = g_settings.video.cg_shader_path;
|
||||
break;
|
||||
@ -299,8 +299,9 @@ static bool gl_shader_init(void *data)
|
||||
|
||||
#ifdef HAVE_GLSL
|
||||
case RARCH_SHADER_GLSL:
|
||||
backend = &gl_glsl_backend;
|
||||
shader_path = g_settings.video.xml_shader_path;
|
||||
backend = &gl_glsl_backend;
|
||||
if (*g_settings.video.xml_shader_path)
|
||||
shader_path = g_settings.video.xml_shader_path;
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -835,7 +835,7 @@ bool gl_cg_init(const char *path)
|
||||
cgGLEnableProfile(cgFProf);
|
||||
cgGLEnableProfile(cgVProf);
|
||||
|
||||
if (strstr(path, ".cgp"))
|
||||
if (path && strstr(path, ".cgp"))
|
||||
{
|
||||
if (!load_preset(path))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user