branch: externals/calibre
commit 07df132f5d11850804f54cb079b184846a0b633e
Author: Kjartan Óli Ágústsson <[email protected]>
Commit: Kjartan Óli Ágústsson <[email protected]>

    Error if no libraries are defined
    
    * calibre-db.el (calibre-select-library): Error if no libraries are defined.
---
 calibre-db.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/calibre-db.el b/calibre-db.el
index ddc3b71222..691186a9ed 100644
--- a/calibre-db.el
+++ b/calibre-db.el
@@ -245,6 +245,8 @@ If FORCE is non-nil the list is refreshed from the 
database."
   "Prompt the user to select a library from `calibre-libraries'.
 If LIBRARY is non-nil, select that instead."
   (interactive)
+  (unless calibre-libraries
+    (error "No Libraries defined"))
   (setf calibre--library (if library
                              library
                            (let ((names (calibre--library-names)))

Reply via email to