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

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

[elpa] externals/ebdb 7570ed9 040/350: Protect against non-present recor


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 7570ed9 040/350: Protect against non-present records in role delete method
Date: Mon, 14 Aug 2017 11:45:58 -0400 (EDT)

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

    Protect against non-present records in role delete method
    
    * ebdb.el (ebdb-delete): This whole thing with the roles needs to be
      reworked.
---
 ebdb.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ebdb.el b/ebdb.el
index 0656bc2..ef9ed85 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -963,10 +963,11 @@ process."
 (cl-defmethod ebdb-delete ((role ebdb-field-role) &optional record unload)
   (when record
     (let* ((org-uuid (slot-value role 'org-uuid))
+          (org (ebdb-gethash org-uuid 'uuid))
           (org-string
-           (slot-value
-            (ebdb-gethash org-uuid 'uuid)
-            'name))
+           (if org
+               (slot-value org 'name)
+             "bogus"))
           (org-entry (gethash org-uuid ebdb-org-hashtable))
           (record-uuid (ebdb-record-uuid record))
           record-entry new-org-entry)



reply via email to

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