git-gui: fix git-gui crash due to uninitialized variable

Recently, a clone initiated via git gui on Windows crashed on me due to
an "unknown variable cdone". It turns out that there is a code path
where this variable is used uninitialized.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
This commit is contained in:
Clemens Buchacher 2012-01-21 18:57:28 +01:00 committed by Pat Thoyts
parent 942e6baa92
commit ba5d445b65

View File

@ -77,6 +77,7 @@ method start {msg uds} {
method update {have total} {
set pdone 0
set cdone 0
if {$total > 0} {
set pdone [expr {100 * $have / $total}]
set cdone [expr {[winfo width $w_c] * $have / $total}]