summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-11-29 11:16:01 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-11-29 11:37:28 (GMT)
commit025d5951aabf6c69109c15ca3a13808820c57125 (patch)
treef0300eabbf96348d37117a744de15ab81017c281 /gui
parent6132ba429c74e066f21078a702cd90a36e3545cc (diff)
downloadeeshow-025d5951aabf6c69109c15ca3a13808820c57125.zip
eeshow-025d5951aabf6c69109c15ca3a13808820c57125.tar.gz
eeshow-025d5951aabf6c69109c15ca3a13808820c57125.tar.bz2
gui/gui.c (add_hist): check that we have a commit before trying to print it
Reported by Alvaro Gamez Machado. Also point out memory leak.
Diffstat (limited to 'gui')
-rw-r--r--gui/gui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/gui.c b/gui/gui.c
index e28c603..834bd74 100644
--- a/gui/gui.c
+++ b/gui/gui.c
@@ -386,7 +386,9 @@ static void add_hist(void *user, struct vcs_hist *h,
age++;
}
- progress(1, "processing revision %s", vcs_git_get_rev(h));
+ /* @@@ should free the string returned by vcs_git_get_rev */
+ progress(1, "processing revision %s",
+ h && h->commit ? vcs_git_get_rev(h) : "(uncommitted)");
hist = alloc_type(struct gui_hist);
hist->gui = gui;