mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 21:02:14 +00:00
workspace: Downgrade abort() to a warning when getting index
Instead of crashing on invalid input, just log a warning and return -1. This will hopefully result in less abort():y behavior with missbehaving Javascript code. Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4203 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2134>
This commit is contained in:
parent
b77cb09bac
commit
4469042e2a
@ -717,9 +717,7 @@ meta_workspace_index (MetaWorkspace *workspace)
|
||||
int ret;
|
||||
|
||||
ret = g_list_index (workspace->manager->workspaces, workspace);
|
||||
|
||||
if (ret < 0)
|
||||
meta_bug ("Workspace does not exist to index!");
|
||||
g_return_val_if_fail (ret >= 0, -1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user