about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ui-shared.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-shared.c b/ui-shared.c index 1858ea4..09c4c94 100644 --- a/ui-shared.c +++ b/ui-shared.c
@@ -896,7 +896,7 @@ void cgit_add_clone_urls(void (*fn)(const char *))
896static int print_this_commit_option(void) 896static int print_this_commit_option(void)
897{ 897{
898 struct object_id oid; 898 struct object_id oid;
899 if (get_oid(ctx.qry.head, &oid)) 899 if (!ctx.qry.head || get_oid(ctx.qry.head, &oid))
900 return 1; 900 return 1;
901 html_option(oid_to_hex(&oid), "this commit", ctx.qry.head); 901 html_option(oid_to_hex(&oid), "this commit", ctx.qry.head);
902 return 0; 902 return 0;