diff options
| -rw-r--r-- | ui-repolist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 25c36ce..f21d28d 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
| @@ -45,7 +45,8 @@ static int get_repo_modtime(const struct cgit_repo *repo, time_t *mtime) | |||
| 45 | return 1; | 45 | return 1; |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch); | 48 | path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch ? |
| 49 | repo->defbranch : "master"); | ||
| 49 | if (stat(path, &s) == 0) { | 50 | if (stat(path, &s) == 0) { |
| 50 | *mtime = s.st_mtime; | 51 | *mtime = s.st_mtime; |
| 51 | r->mtime = *mtime; | 52 | r->mtime = *mtime; |
