diff --git a/eeshow/git-hist.c b/eeshow/git-hist.c index a016218..57c886d 100644 --- a/eeshow/git-hist.c +++ b/eeshow/git-hist.c @@ -229,6 +229,8 @@ char *vcs_git_long_for_pango(struct hist *h) const git_signature *sig; char *s; + if (!h->commit) + return stralloc("Uncommitted changes"); if (git_object_short_id(&buf, (git_object *) h->commit)) goto fail; commit_time = git_commit_time(h->commit); diff --git a/eeshow/gui.c b/eeshow/gui.c index d5ae252..31a50bf 100644 --- a/eeshow/gui.c +++ b/eeshow/gui.c @@ -1148,7 +1148,7 @@ static const struct sheet *parse_files(struct gui_hist *hist, bool libs_cached = 0; bool ok; - if (hist->vcs_hist) + if (hist->vcs_hist && hist->vcs_hist->commit) rev = vcs_git_get_rev(hist->vcs_hist); sch_init(&hist->sch_ctx, recurse);