Merge branch 'rs/apply-inaccurate-eof-with-incomplete-line' into maint
[gitweb.git] / builtin / remote.c
index 4f5cac96b0f5e0044ddf0fd1e2ea686f694d62ca..bc896236952079fc3ae06e23101991169dea64fc 100644 (file)
@@ -565,7 +565,7 @@ static int read_remote_branches(const char *refname,
                item = string_list_append(rename->remote_branches, xstrdup(refname));
                symref = resolve_ref_unsafe(refname, RESOLVE_REF_READING,
                                            NULL, &flag);
-               if (flag & REF_ISSYMREF)
+               if (symref && (flag & REF_ISSYMREF))
                        item->util = xstrdup(symref);
                else
                        item->util = NULL;