From a498d8577ec2e0564f7ee322f6de6216d824e8fc Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 4 Jan 2021 17:42:26 +0100 Subject: [PATCH] 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: --- js/ui/workspacesView.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 177fd413d..268adae44 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -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) {