mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
monitor-config-store: Don't crash when cleaning up after failing to load
The logical monitor config array ownership was transferred to the config object when it was created, but was not unset when the config verification failed, causing the clean up path for invalid configs to try to clean up the same list again. https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
8163ca6821
commit
ac68631f4c
@ -546,6 +546,8 @@ handle_end_element (GMarkupParseContext *context,
|
||||
meta_monitors_config_new (parser->current_logical_monitor_configs,
|
||||
layout_mode);
|
||||
|
||||
parser->current_logical_monitor_configs = NULL;
|
||||
|
||||
if (!meta_verify_monitors_config (config, error))
|
||||
{
|
||||
g_object_unref (config);
|
||||
@ -555,8 +557,6 @@ handle_end_element (GMarkupParseContext *context,
|
||||
g_hash_table_replace (parser->config_store->configs,
|
||||
config->key, config);
|
||||
|
||||
parser->current_logical_monitor_configs = NULL;
|
||||
|
||||
parser->state = STATE_MONITORS;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user