submodule: convert stage_updated_gitmodules to take a struct index_state
[gitweb.git] / log-tree.c
index 8dacccc0c28a1699c03726440fe6203db3a6cf3d..3b904f0375e233db974ab49b3b31dd2fc73e842d 100644 (file)
@@ -198,7 +198,7 @@ static const struct name_decoration *current_pointed_by_HEAD(const struct name_d
 
        /* Now resolve and find the matching current branch */
        branch_name = resolve_ref_unsafe("HEAD", 0, NULL, &rru_flags);
-       if (!(rru_flags & REF_ISSYMREF))
+       if (!branch_name || !(rru_flags & REF_ISSYMREF))
                return NULL;
 
        if (!starts_with(branch_name, "refs/"))