diff --git a/commit.c b/commit.c
index e867b86e6a10d64354226b04f71df98d7448e072..edd4dedcdd13c2c3fd02714ef282b173f7cec7fe 100644 (file)
--- a/commit.c
+++ b/commit.c
next = next->next;
count++;
}
+
+ if (!count)
+ return;
/* allocate an array to help sort the list */
nodes = xcalloc(count, sizeof(*nodes));
/* link the list to the array */