[gnome-shell/gbsneto/40-stuff: 52/68] workspacesView: Check for primaryView being null
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/40-stuff: 52/68] workspacesView: Check for primaryView being null
- Date: Wed, 20 Jan 2021 22:41:08 +0000 (UTC)
commit b695b7984c54f553ea17c655fb322abcc98886ff
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 4 17:42:26 2021 +0100
workspacesView: Check for primaryView being null
This is possible according to the getter, and triggers warnings
seen when going back from overview via gestures.
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 3e9c1dcdcd..1fa858f246 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -816,7 +816,10 @@ class WorkspacesDisplay extends St.Widget {
}
activeWorkspaceHasMaximizedWindows() {
- return this._getPrimaryView().getActiveWorkspace().hasMaximizedWindows();
+ const primaryView = this._getPrimaryView();
+ return primaryView
+ ? primaryView.getActiveWorkspace().hasMaximizedWindows()
+ : false;
}
vfunc_parent_set(oldParent) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]