commit 19aec9ed9a53a18deaa58b69714bae724aec7111
Author: Carsten Dominik <carsten.dominik@gmail.com>
Date:   Mon May 10 08:46:03 2010 +0200

    Fix minor bug
    
    Patch by Gregory J. Grubbs

	Modified lisp/org.el
diff --git a/lisp/org.el b/lisp/org.el
index 8f9e16c..85c79ee 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17700,7 +17700,7 @@ so values can contain further %-escapes if they are define later in TABLE."
         e re rpl)
     (while (setq e (pop tbl))
       (setq re (concat "%-?[0-9.]*" (substring (car e) 1)))
-      (when (string-match re (cdr e))
+      (when (and (cdr e) (string-match re (cdr e)))
         (let ((sref (substring (cdr e) (match-beginning 0) (match-end 0)))
               (safe "SREF"))
           (add-text-properties 0 3 (list 'sref sref) safe)

