X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=promisor-remote.c;h=9bd5b79d59446dede45ea075fc8d7307fcb98648;hb=020011f2cb9873dccaad71f6ecbe56d0eac530e2;hp=9bc296cdde2acc3871c0738533decb70c69f1b62;hpb=f0fcab6deb0bdd005d4725b4377ea1471e2f07a0;p=thirdparty%2Fgit.git diff --git a/promisor-remote.c b/promisor-remote.c index 9bc296cdde..9bd5b79d59 100644 --- a/promisor-remote.c +++ b/promisor-remote.c @@ -89,6 +89,9 @@ static struct promisor_remote *promisor_remote_lookup(const char *remote_name, static void promisor_remote_move_to_tail(struct promisor_remote *r, struct promisor_remote *previous) { + if (r->next == NULL) + return; + if (previous) previous->next = r->next; else