mc_config_get_string_raw(): if default parameter is NULL, then no any config entities will be created

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2013-01-13 16:47:11 +03:00
parent 808988b1f1
commit 5b63c39459
1 changed files with 2 additions and 1 deletions

View File

@ -140,7 +140,8 @@ mc_config_get_string_raw (const mc_config_t * mc_config, const gchar * group,
if (!mc_config_has_param (mc_config, group, param))
{
mc_config_set_string (mc_config, group, param, def ? def : "");
if (def != NULL)
mc_config_set_string (mc_config, group, param, def);
return g_strdup (def);
}