X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=blobdiff_plain;f=promisor-remote.c;h=9bd5b79d59446dede45ea075fc8d7307fcb98648;hp=9bc296cdde2acc3871c0738533decb70c69f1b62;hb=5b7594abdcdcfb98e7db6f485921b0562477170d;hpb=cabb145fe36c4e11ed9fd18b852b218e9407ac8b 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