(shader_glsl.c) Fix dereference after null check warnings

This commit is contained in:
twinaphex 2016-06-05 19:02:13 +02:00
parent 553ff7f69f
commit c1f9d7b498

View File

@ -732,7 +732,7 @@ static void *gl_glsl_init(void *data, const char *path)
if (!glsl->shader)
goto error;
if (path)
if (!string_is_empty(path))
{
bool ret = false;
const char *path_ext = path_get_extension(path);
@ -772,6 +772,7 @@ static void *gl_glsl_init(void *data, const char *path)
glsl->shader->modern = true;
}
if (!string_is_empty(path))
video_shader_resolve_relative(glsl->shader, path);
video_shader_resolve_parameters(conf, glsl->shader);
@ -1321,6 +1322,7 @@ static bool gl_glsl_set_coords(void *handle_data, void *shader_data, const struc
return true;
fallback:
if (coords)
gl_ff_vertex(coords);
return false;
}