workspace: Sanity check input to activate*()

The passed argument should be a workspace, and it should not have been
removed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2707>
This commit is contained in:
Jonas Ådahl 2022-11-23 10:26:55 +01:00 committed by Marge Bot
parent 9d9fcc0bb1
commit e709853ad3

View File

@ -577,6 +577,9 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
gint num_workspaces, current_space, new_space;
MetaMotionDirection direction;
g_return_if_fail (META_IS_WORKSPACE (workspace));
g_return_if_fail (meta_workspace_index (workspace) != -1);
meta_verbose ("Activating workspace %d",
meta_workspace_index (workspace));