         (setq first-line nil))
       (setq i-fname (svn-status-line-info->filename (car st-info)))
       (when (or (string= file-name i-fname)
-                (string-match sub-file-regexp i-fname))
+                (when sub-file-regexp
+                  (string-match sub-file-regexp i-fname)))
         (when (svn-status-line-info->is-visiblep (car st-info))
           (when (or (not only-this-line) (string= file-name i-fname))
             (setq newcursorpos-fname i-fname)

                                                   svn-wc-locked-mark
                                                   svn-with-history-mark
                                                   svn-switched-mark
                                                   svn-repo-locked-mark)
                        svn-status-info)))
          (when (eq svn-file-mark ?X)
            (svn-puthash (match-string 1) (car svn-status-info) externals-map)

                                  locked-mark
                                  with-history-mark
                                  switched-mark
                                  locked-repo-mark
                                  psvn-extra-info)
  "Create a new line-info from the given arguments
Anything left nil gets a sensible default.
nb: LOCKED-MARK refers to the kind of locks you get after an error,
