summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Side-by-side diff
Diffstat (limited to 'ui-shared.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-shared.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 209af6e..4280a70 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -520,3 +520,4 @@ void add_hidden_formfields(int incl_head, int incl_search, char *page)
- if (incl_head && strcmp(ctx.qry.head, ctx.repo->defbranch))
+ if (incl_head && ctx.qry.head && ctx.repo->defbranch &&
+ strcmp(ctx.qry.head, ctx.repo->defbranch))
html_hidden("h", ctx.qry.head);