branch: externals/inspector
commit 85a87a6cbaaa26e4fb0d6749163d0781a93db7c4
Merge: 4e85b25e3e e5cc60aecd
Author: Mariano Montone <marianomont...@gmail.com>
Commit: GitHub <nore...@github.com>

    Merge pull request #33 from daanturo/killed-inspector--temp-buffer
    
    Fix corner case inspector--temp-buffer is killed
---
 inspector.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/inspector.el b/inspector.el
index 39d14723f7..f7fe059af4 100644
--- a/inspector.el
+++ b/inspector.el
@@ -241,9 +241,10 @@ See: `inspector--with-inspector-temp-buffer'.")
 
 (defun inspector--get-inspector-temp-buffer ()
   "Return a (cached) inspector temporary buffer."
-  (or inspector--temp-buffer
-      (setq inspector--temp-buffer
-            (get-buffer-create "*inspector-temp*"))))
+  (unless (buffer-live-p inspector--temp-buffer)
+    (setq inspector--temp-buffer
+          (get-buffer-create "*inspector-temp*")))
+  inspector--temp-buffer)
 
 (defun inspector--print-truncated (object &optional limit)
   "Print OBJECT to a string, truncated.

Reply via email to