summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2012-01-21 18:57:28 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2012-01-22 23:16:03 +0000
commitba5d445b653f874d9e4f2fd97fdd87438f45a70d (patch)
tree6debc55818effd554cd9d9dc79e5048abed22c0c
parent942e6baa92846e5628752c65a22bc4957d8de4d0 (diff)
downloadgit-ba5d445b653f874d9e4f2fd97fdd87438f45a70d.tar.gz
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>
-rw-r--r--lib/status_bar.tcl1
1 files changed, 1 insertions, 0 deletions
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}]