workspacesView: Check for primaryView being null

This is possible according to the getter, and triggers warnings
seen when going back from overview via gestures.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1643>
This commit is contained in:
Carlos Garnacho 2021-01-04 17:42:26 +01:00
parent ea881ed077
commit a498d8577e

View File

@ -873,7 +873,10 @@ class WorkspacesDisplay extends St.Widget {
}
activeWorkspaceHasMaximizedWindows() {
return this._getPrimaryView().getActiveWorkspace().hasMaximizedWindows();
const primaryView = this._getPrimaryView();
return primaryView
? primaryView.getActiveWorkspace().hasMaximizedWindows()
: false;
}
_onRestacked(overview, stackIndices) {