Commit dbd05302 authored by Jonas Ådahl's avatar Jonas Ådahl

settings: Avoid warning when clearing xwayland grab access lists

On the first run, they are NULL, so don't try to free them.

https://bugzilla.gnome.org/show_bug.cgi?id=792853
parent c063d43b
......@@ -348,11 +348,13 @@ update_xwayland_grab_access_rules (MetaSettings *settings)
int i;
/* Free previous patterns and create new arrays */
g_ptr_array_free (settings->xwayland_grab_whitelist_patterns, TRUE);
g_clear_pointer (&settings->xwayland_grab_whitelist_patterns,
g_ptr_array_unref);
settings->xwayland_grab_whitelist_patterns =
g_ptr_array_new_with_free_func ((GDestroyNotify) g_pattern_spec_free);
g_ptr_array_free (settings->xwayland_grab_blacklist_patterns, TRUE);
g_clear_pointer (&settings->xwayland_grab_blacklist_patterns,
g_ptr_array_unref);
settings->xwayland_grab_blacklist_patterns =
g_ptr_array_new_with_free_func ((GDestroyNotify) g_pattern_spec_free);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment