branch: externals/calibre
commit 73966363414eaad96d370a928cb1aceb84bbec85
Author: Kjartan Óli Ágústsson <[email protected]>
Commit: Kjartan Óli Ágústsson <[email protected]>
Only refresh Library buffer if it exists
* calibre-db.el (calibre-library--refresh): Wrap body in (when
buffer...)
---
calibre-db.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/calibre-db.el b/calibre-db.el
index cfda81fe0d..9f865a269d 100644
--- a/calibre-db.el
+++ b/calibre-db.el
@@ -146,11 +146,12 @@ If no library is active, prompt the user to select one."
"Refresh the contents of the library buffer.
If FORCE is non-nil fetch book data from the database."
(let* ((buffer (get-buffer calibre-library-buffer)))
+ (when buffer
(with-current-buffer buffer
(setf tabulated-list-entries
(mapcar #'calibre-book--print-info
(calibre--books force)))
- (tabulated-list-print))))
+ (tabulated-list-print)))))
(defun calibre-book--print-info (book)
"Return list suitable as a value of `tabulated-list-entries'.