From a4e76727be273185c7eee5758262d58c5aa4ccdd Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Wed, 20 Feb 2013 21:16:05 -0700 Subject: Put in more nil window protection. --- lisp/ldg-occur.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/ldg-occur.el') diff --git a/lisp/ldg-occur.el b/lisp/ldg-occur.el index 417a3d2a..c3f04c5d 100644 --- a/lisp/ldg-occur.el +++ b/lisp/ldg-occur.el @@ -82,7 +82,8 @@ When REGEX is nil, unhide everything, and remove higlight" (append ledger-occur-overlay-list (ledger-occur-create-folded-overlays buffer-matches))) (setq ledger-occur-last-match regex) - (select-window (get-buffer-window buffer)))) + (if (get-buffer-window buffer) + (select-window (get-buffer-window buffer))))) (recenter))) (defun ledger-occur (regex) -- cgit v1.2.3