Don't crash if Cg is init with NULL.
This commit is contained in:
parent
7111558359
commit
7a20cfa79c
1
gfx/gl.c
1
gfx/gl.c
|
@ -300,6 +300,7 @@ static bool gl_shader_init(void *data)
|
||||||
#ifdef HAVE_GLSL
|
#ifdef HAVE_GLSL
|
||||||
case RARCH_SHADER_GLSL:
|
case RARCH_SHADER_GLSL:
|
||||||
backend = &gl_glsl_backend;
|
backend = &gl_glsl_backend;
|
||||||
|
if (*g_settings.video.xml_shader_path)
|
||||||
shader_path = g_settings.video.xml_shader_path;
|
shader_path = g_settings.video.xml_shader_path;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -835,7 +835,7 @@ bool gl_cg_init(const char *path)
|
||||||
cgGLEnableProfile(cgFProf);
|
cgGLEnableProfile(cgFProf);
|
||||||
cgGLEnableProfile(cgVProf);
|
cgGLEnableProfile(cgVProf);
|
||||||
|
|
||||||
if (strstr(path, ".cgp"))
|
if (path && strstr(path, ".cgp"))
|
||||||
{
|
{
|
||||||
if (!load_preset(path))
|
if (!load_preset(path))
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue