mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Remove extra check before call mc_config_deinit()
...and minor cleanup of related code. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
5324bc63bf
commit
4c0ba932a8
@ -116,13 +116,11 @@ mc_fhl_free (mc_fhl_t ** fhl)
|
||||
void
|
||||
mc_fhl_clear (mc_fhl_t * fhl)
|
||||
{
|
||||
if (fhl == NULL)
|
||||
return;
|
||||
|
||||
if (fhl->config)
|
||||
if (fhl != NULL)
|
||||
{
|
||||
mc_config_deinit (fhl->config);
|
||||
|
||||
mc_fhl_array_free (fhl);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -131,13 +131,12 @@ mc_config_init (const gchar * ini_path)
|
||||
void
|
||||
mc_config_deinit (mc_config_t * mc_config)
|
||||
{
|
||||
if (!mc_config)
|
||||
return;
|
||||
|
||||
if (mc_config != NULL)
|
||||
{
|
||||
g_free (mc_config->ini_path);
|
||||
g_key_file_free (mc_config->handle);
|
||||
g_free (mc_config);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
@ -149,7 +149,6 @@ mc_skin_init (GError ** error)
|
||||
void
|
||||
mc_skin_deinit (void)
|
||||
{
|
||||
|
||||
g_free (mc_skin__default.name);
|
||||
mc_skin__default.name = NULL;
|
||||
g_hash_table_destroy (mc_skin__default.colors);
|
||||
@ -158,10 +157,8 @@ mc_skin_deinit (void)
|
||||
g_free (mc_skin__default.description);
|
||||
mc_skin__default.description = NULL;
|
||||
|
||||
if (mc_skin__default.config) {
|
||||
mc_config_deinit (mc_skin__default.config);
|
||||
mc_skin__default.config = NULL;
|
||||
}
|
||||
|
||||
mc_skin_is_init = FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user