]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
Fix segmentation fault in hc()
[ps-cgit] / ui-shared.c
index 48358cc04170df515e23f3a07af6111f0bab7f35..5b487342d7f09e0faca82cbdb195aa8ae076b6aa 100644 (file)
@@ -889,6 +889,9 @@ void cgit_add_hidden_formfields(int incl_head, int incl_search,
 
 static const char *hc(const char *page)
 {
+       if (!ctx.qry.page)
+               return NULL;
+
        return strcmp(ctx.qry.page, page) ? NULL : "active";
 }