Explorar o código

Fix wrong-type-argument error when opening id link

* lisp/org.el (org-open-at-point): Check if link is non-nil before
  matching it.

Reported-by: Daniel Clemente <n142857@gmail.com>
Nicolas Goaziou %!s(int64=11) %!d(string=hai) anos
pai
achega
e186cc804b
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -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))