summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgitk2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitk b/gitk
index 322ac93f86..c060ce98cb 100755
--- a/gitk
+++ b/gitk
@@ -4573,7 +4573,7 @@ proc drawvisible {} {
set fs [$canv yview]
set ymax [lindex [$canv cget -scrollregion] 3]
- if {$ymax eq {} || $ymax == 0} return
+ if {$ymax eq {} || $ymax == 0 || $numcommits == 0} return
set f0 [lindex $fs 0]
set f1 [lindex $fs 1]
set y0 [expr {int($f0 * $ymax)}]