           (when pos
             (svn-update-status-flag pos ?\  ?\ )
             (svn-update-status-msg pos "Committed"))
-          (when file-buffer
+          (when (and file-buffer (fboundp 'vc-svn-workfile-version))
             (with-current-buffer file-buffer
               ;; Use buffer-file-name instead of path to get the
               ;; canonical file name used by vc

                 (svn-action-files)))
        (commit-buf (current-buffer))
        (status-buf svn-status-buf)
        (msg-file (make-temp-file "svn-commit")))
    ;; Ensure final newline
    (goto-char (point-max))
    (unless (bolp)

                      (insert "         Top-level directory:")
                    (insert "         Directory " dir ":"))
                  (newline)
		  ;; Next line only needed on XEmacs
		  (remove-text-properties start (point) '(svn-file nil))
                  (add-text-properties start (point)
                                       (list 'face 'bold
                                             'svn-dir dir))))))
          (forward-line 1))))))

