org-special-blocks.el: Prevent errors by first checking `org-line' is not nil.

* org-special-blocks.el
(org-special-blocks-convert-html-special-cookies): Prevent
errors by first checking `org-line' is not nil.

Thanks to Sébastien Vauban for reporting this.
This commit is contained in:
Bastien Guerry 2012-06-28 11:19:56 +02:00
parent cf8d979d8c
commit 108fd10a27
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ seen. This is run after a few special cases are taken care of."
(defun org-special-blocks-convert-html-special-cookies ()
"Converts the special cookies into div blocks."
;; Uses the dynamically-bound variable `org-line'.
(when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-line)
(when (and org-line (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-line))
(message "%s" (match-string 1))
(when (equal (match-string 2 org-line) "START")
(org-close-par-maybe)