Add extra checks in macro engine.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
Slava Zanko 2012-12-13 23:00:15 +04:00 committed by Andrew Borodin
parent 8a1971026d
commit db2c31decc
1 changed files with 1 additions and 1 deletions

View File

@ -1944,7 +1944,7 @@ edit_load_macro_cmd (WEdit * edit)
macros_config = mc_config_init (macros_fname, TRUE);
g_free (macros_fname);
if (macros_config == NULL)
if (macros_config == NULL || macros_list == NULL || macros_list->len != 0)
return FALSE;
profile_keys = keys = mc_config_get_keys (macros_config, section_name, &len);