From e2bf7ce8b68b35adc5a8d9200a84373baf1cce8b Mon Sep 17 00:00:00 2001 From: Heinz Fridolin Date: Sun, 15 Feb 2026 02:37:47 +0100 Subject: [PATCH] project.el: Fix in submodules with nonexistent git root (bug#80402) project-try-vc--search in a submodule directory tries to find the git root directory, so the local variable root would be set to nil if it didn't exist. Calling project--vc-merge-submodules-p on nil would lead to a crash, so now the while loop aborts beforehand. --- lisp/progmodes/project.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 0273eea26b8..afadd9b35a3 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -698,6 +698,7 @@ in the `project-current' call, the timeout is determined by vc-handled-backends)) project) (while (and + root (eq backend 'Git) (project--vc-merge-submodules-p root) (project--submodule-p root))