emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb cc83f62 197/350: Add protection around ebdb-record


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb cc83f62 197/350: Add protection around ebdb-record-uuid
Date: Mon, 14 Aug 2017 11:46:36 -0400 (EDT)

branch: externals/ebdb
commit cc83f62f9bdb1814b52b50d83b7246942ae456f8
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    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

[Prev in Thread] Current Thread [Next in Thread]