mc_config_get_string(): 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-14 15:09:26 +03:00
parent 5b63c39459
commit e50c3f8475
1 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,8 @@ mc_config_get_string (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);
}