[mutter/wip/wayland: 1/4] screen: Don't ref workspace->screen after freeing workspace



commit 54de60d9571567bd39300707779d18ed07273a31
Author: Robert Bragg <robert linux intel com>
Date:   Fri Jan 20 15:41:28 2012 +0000

    screen: Don't ref workspace->screen after freeing workspace
    
    In meta_screen_remove_workspace its possible that the workspace will be
    disposed before we call meta_screen_set_active_workspace_hint to update
    the active workspace index so we make sure to use the screen pointer
    passed as an argument to meta_screen_remove_workspace() instead of
    referring to the workspace->screen pointer which might cause a crash if
    workspace was indeed freed.

 src/core/screen.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/core/screen.c b/src/core/screen.c
index ba2b967..5145df5 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1492,7 +1492,7 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
   /* If deleting a workspace before the current workspace, the active
    * workspace index changes, so we need to update that hint */
   if (active_index_changed)
-      meta_screen_set_active_workspace_hint (workspace->screen);
+      meta_screen_set_active_workspace_hint (screen);
 
   l = next;
   while (l)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]