summaryrefslogtreecommitdiff
path: root/lisp/window.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 2ae1a2c9e79..7810ba4c5be 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -246,9 +246,10 @@ then the smallest tree containing that window is returned."
(windowp window-or-frame))
(error "Not a frame or window: %s" window-or-frame)))
(let ((subtree (bw-find-tree-sub window-or-frame)))
- (if (integerp subtree)
- nil
- (bw-get-tree-1 subtree))))
+ (when subtree
+ (if (integerp subtree)
+ nil
+ (bw-get-tree-1 subtree)))))
(defun bw-get-tree-1 (split)
(if (windowp split)