summaryrefslogtreecommitdiff
path: root/promisor-remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'promisor-remote.c')
-rw-r--r--promisor-remote.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/promisor-remote.c b/promisor-remote.c
index 9bc296c..9bd5b79 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