]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.c
ui-shared: don't print header <img/> if there isn't a logo defined
[ps-cgit] / cgit.c
diff --git a/cgit.c b/cgit.c
index 608cab658425e5c11270ac3d1690a842eec71891..530184010844a42f1275864bf9b12168ca111288 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -31,6 +31,8 @@ void config_cb(const char *name, const char *value)
                ctx.cfg.favicon = xstrdup(value);
        else if (!strcmp(name, "footer"))
                ctx.cfg.footer = xstrdup(value);
+       else if (!strcmp(name, "header"))
+               ctx.cfg.header = xstrdup(value);
        else if (!strcmp(name, "logo"))
                ctx.cfg.logo = xstrdup(value);
        else if (!strcmp(name, "index-header"))
@@ -130,6 +132,9 @@ void config_cb(const char *name, const char *value)
 
 static void querystring_cb(const char *name, const char *value)
 {
+       if (!value)
+               value = "";
+
        if (!strcmp(name,"r")) {
                ctx.qry.repo = xstrdup(value);
                ctx.repo = cgit_get_repoinfo(value);