colors: handle case when no color scheme is chosen

This commit is contained in:
Boris Faure 2023-03-25 15:01:48 +01:00
parent 092f542d76
commit 5409097373
Signed by: borisfaure
GPG Key ID: EAA9CD729F522998
1 changed files with 2 additions and 1 deletions

View File

@ -721,7 +721,8 @@ config_compute_color_scheme(Config *cfg)
EINA_SAFETY_ON_NULL_RETURN(cfg);
free((void*)cfg->color_scheme);
cfg->color_scheme = _color_scheme_get(cfg->color_scheme_name);
cfg->color_scheme = (cfg->color_scheme_name) ?
_color_scheme_get(cfg->color_scheme_name) : NULL;
if (!cfg->color_scheme)
{
eina_stringshare_del(cfg->color_scheme_name);