Skip to content

Commit 66b745c

Browse files
committed
WorkspaceManager/cleanup: Fix crash
1 parent b5d774d commit 66b745c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/WorkspaceManager.vala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ public class Gala.WorkspaceManager : Object {
263263
unowned Meta.WorkspaceManager manager = wm.get_display ().get_workspace_manager ();
264264

265265
foreach (var workspace in manager.get_workspaces ()) {
266-
maybe_remove_workspace (workspace, null);
266+
if (!workspace.active && Utils.get_n_windows (workspace, true) == 0 && workspace.index () != manager.n_workspaces - 1) {
267+
queue_remove_workspace (workspace);
268+
}
267269
}
268270
}
269271
}

0 commit comments

Comments
 (0)