Incompatible shader backend conditional was reached even if we had

no shader set
This commit is contained in:
twinaphex 2017-01-24 15:01:48 +01:00
parent a9ceed79fa
commit afb0881f05

View File

@ -2205,7 +2205,10 @@ static bool config_load_file(const char *path, bool set_defaults,
for(i = FILE_PATH_CGP_EXTENSION; i <= FILE_PATH_SLANGP_EXTENSION; i++)
{
if(strstr(file_path_str((enum file_path_enum)(i)), path_get_extension(settings->path.shader)))
const char *shader_ext = path_get_extension(settings->path.shader);
if(!string_is_empty(shader_ext)
&& strstr(file_path_str((enum file_path_enum)(i)), shader_ext))
{
if (!check_shader_compatibility((enum file_path_enum)i))
{