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) {