mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
Don't attempt to double-free struts, edges and regions if work areas have
2008-07-13 Elijah Newren <newren gmail com> * src/core/workspace.c (meta_workspace_free): Don't attempt to double-free struts, edges and regions if work areas have already been invalidated at the time of freeing a workspace. Possible fix to #361804. svn path=/trunk/; revision=3787
This commit is contained in:
parent
24e63a0d2d
commit
dacf784498
@ -1,3 +1,10 @@
|
|||||||
|
2008-07-13 Elijah Newren <newren gmail com>
|
||||||
|
|
||||||
|
* src/core/workspace.c (meta_workspace_free): Don't attempt to
|
||||||
|
double-free struts, edges and regions if work areas have already
|
||||||
|
been invalidated at the time of freeing a workspace.
|
||||||
|
Possible fix to #361804.
|
||||||
|
|
||||||
2008-07-12 Thomas Thurman <tthurman@gnome.org>
|
2008-07-12 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
* src/core/constraints.c (do_screen_and_xinerama_relative_constraints):
|
* src/core/constraints.c (do_screen_and_xinerama_relative_constraints):
|
||||||
|
@ -116,15 +116,25 @@ meta_workspace_free (MetaWorkspace *workspace)
|
|||||||
g_free (workspace->work_area_xinerama);
|
g_free (workspace->work_area_xinerama);
|
||||||
|
|
||||||
g_list_free (workspace->mru_list);
|
g_list_free (workspace->mru_list);
|
||||||
g_slist_free (workspace->all_struts);
|
|
||||||
g_list_free (workspace->list_containing_self);
|
g_list_free (workspace->list_containing_self);
|
||||||
|
|
||||||
|
/* screen.c:update_num_workspaces(), which calls us, removes windows from
|
||||||
|
* workspaces first, which can cause the workareas on the workspace to be
|
||||||
|
* invalidated (and hence for struts/regions/edges to be freed).
|
||||||
|
* So, no point trying to double free it; that causes a crash
|
||||||
|
* anyway. #361804.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!workspace->work_areas_invalid)
|
||||||
|
{
|
||||||
|
g_slist_free (workspace->all_struts);
|
||||||
for (i = 0; i < screen->n_xinerama_infos; i++)
|
for (i = 0; i < screen->n_xinerama_infos; i++)
|
||||||
meta_rectangle_free_list_and_elements (workspace->xinerama_region[i]);
|
meta_rectangle_free_list_and_elements (workspace->xinerama_region[i]);
|
||||||
g_free (workspace->xinerama_region);
|
g_free (workspace->xinerama_region);
|
||||||
meta_rectangle_free_list_and_elements (workspace->screen_region);
|
meta_rectangle_free_list_and_elements (workspace->screen_region);
|
||||||
meta_rectangle_free_list_and_elements (workspace->screen_edges);
|
meta_rectangle_free_list_and_elements (workspace->screen_edges);
|
||||||
meta_rectangle_free_list_and_elements (workspace->xinerama_edges);
|
meta_rectangle_free_list_and_elements (workspace->xinerama_edges);
|
||||||
|
}
|
||||||
|
|
||||||
g_free (workspace);
|
g_free (workspace);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user