diff --git a/src/core/screen.c b/src/core/screen.c index 2e59754d1..11f3badd4 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -836,6 +836,7 @@ meta_screen_free (MetaScreen *screen, guint32 timestamp) { MetaDisplay *display; + GList *l; display = screen->display; @@ -877,6 +878,16 @@ meta_screen_free (MetaScreen *screen, g_free (screen->screen_name); + screen->active_workspace = NULL; + + for (l = screen->workspaces; l;) + { + MetaWorkspace *workspace = l->data; + l = l->next; + + meta_workspace_remove (workspace); + } + g_object_unref (screen); }