diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index ddc79dc6944..03d74a353e2 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -685,7 +685,8 @@ See `project-vc-extra-root-markers' for the marker value format.") (backend (cadr project))) (when backend (require (intern (concat "vc-" (downcase (symbol-name backend)))))) - (if (file-in-directory-p dir (nth 2 project)) + (if (and backend + (file-in-directory-p dir (nth 2 project))) (condition-case nil (project--vc-list-files dir backend ignores) (vc-not-supported