From: Clemens Buchacher Date: Sat, 21 Jan 2012 17:57:28 +0000 (+0100) Subject: git-gui: fix git-gui crash due to uninitialized variable X-Git-Tag: gitgui-0.17.0~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba5d445b653f874d9e4f2fd97fdd87438f45a70d;p=thirdparty%2Fgit.git 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 Signed-off-by: Pat Thoyts --- diff --git a/lib/status_bar.tcl b/lib/status_bar.tcl index 95cb44991f..02111a1742 100644 --- a/lib/status_bar.tcl +++ b/lib/status_bar.tcl @@ -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}]