Browse Source

Minor fix

Carsten Dominik 15 years ago
parent
commit
6a5e18397f
2 changed files with 9 additions and 2 deletions
  1. 5 0
      lisp/ChangeLog
  2. 4 2
      lisp/org-html.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2010-03-31  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-html.el (org-html-level-start): Catch the case that target
+	might be nil.
+
 2010-03-29  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-agenda.el (org-diary-last-run-time): New variable.

+ 4 - 2
lisp/org-html.el

@@ -2017,9 +2017,11 @@ If there are links in the string, don't modify these."
 When TITLE is nil, just close all open levels."
   (org-close-par-maybe)
   (let* ((target (and title (org-get-text-property-any 0 'target title)))
-	 (extra-targets (assoc target org-export-target-aliases))
+	 (extra-targets (and target
+			     (assoc target org-export-target-aliases)))
 	 (extra-class (and title (org-get-text-property-any 0 'html-container-class title)))
-	 (preferred (cdr (assoc target org-export-preferred-target-alist)))
+	 (preferred (and target
+			 (cdr (assoc target org-export-preferred-target-alist))))
 	 (remove (or preferred target))
 	 (l org-level-max)
 	 snumber href suffix)