Fix wrong-type-argument error when opening id link
authorNicolas Goaziou <n.goaziou@gmail.com>
Sun, 3 Nov 2013 12:06:14 +0000 (3 13:06 +0100)
committerNicolas Goaziou <n.goaziou@gmail.com>
Sun, 3 Nov 2013 12:06:14 +0000 (3 13:06 +0100)
* lisp/org.el (org-open-at-point): Check if link is non-nil before
  matching it.

Reported-by: Daniel Clemente <n142857@gmail.com>
lisp/org.el

index 8da6f7d..5e1f195 100644 (file)
@@ -10543,7 +10543,8 @@ application the system uses for this file type."
           ((and (string= type "thisfile")
                 (or (run-hook-with-args-until-success
                      'org-open-link-functions path)
-                    (and (string-match "^id:" link)
+                    (and link
+                         (string-match "^id:" link)
                          (or (featurep 'org-id) (require 'org-id))
                          (progn
                            (funcall (nth 1 (assoc "id" org-link-protocols))