diff options
author | Jonas Ã…dahl <jadahl@gmail.com> | 2022-11-23 10:26:55 +0100 |
---|---|---|
committer | Robert Mader <robert.mader@collabora.com> | 2023-01-06 13:53:08 +0100 |
commit | 421222c7051b104ae8e4844cc44cbae84cc72ba8 (patch) | |
tree | 3a27df8cdb5af7e5b971ea4d7a2cbdd673836499 | |
parent | 6b8f044e279774168a7d16e2bbbbc268974e3203 (diff) | |
download | mutter-421222c7051b104ae8e4844cc44cbae84cc72ba8.tar.gz |
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>
(cherry picked from commit e709853ad3d043ee2ed72e75fbda0c225e30eda7)
-rw-r--r-- | src/core/workspace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/workspace.c b/src/core/workspace.c index d2ad19e36..057d44721 100644 --- a/src/core/workspace.c +++ b/src/core/workspace.c @@ -567,6 +567,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)); |