branch: externals/ebdb
commit cc83f62f9bdb1814b52b50d83b7246942ae456f8
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>

    Add protection around ebdb-record-uuid
    
    * ebdb.el (ebdb-record-uuid): The slot value might not even be
      present.
---
 ebdb.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ebdb.el b/ebdb.el
index 0745252..e293e29 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -1820,7 +1820,8 @@ If UNLOAD is non-nil, we should only unload RECORD, not 
delete it
 altogether.")
 
 (cl-defmethod ebdb-record-uuid ((record ebdb-record))
-  (slot-value (slot-value record 'uuid) 'uuid))
+  (if-let ((uuid-field (slot-value record 'uuid)))
+   (slot-value uuid-field 'uuid)))
 
 (cl-defmethod ebdb-read ((class (subclass ebdb-record)) &optional slots)
   "Create a new record from the values collected into SLOTS."

Reply via email to