Code

git-gui: Bug fix for bad variable reference in display_file.
authorShawn O. Pearce <spearce@spearce.org>
Wed, 8 Nov 2006 03:09:55 +0000 (22:09 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 8 Nov 2006 04:48:23 +0000 (23:48 -0500)
When a file jumps between the file lists due to its state changing we
crashed thanks to a stale variable reference within the procedure as we
tried to setup the new icon.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui

diff --git a/git-gui b/git-gui
index d405008d2c7f85598f6d6dcac4c978a6906a1f7c..515cbb9dfb0b8694d54ef7b85d7fbf5c7d3ad4f2 100755 (executable)
--- a/git-gui
+++ b/git-gui
@@ -819,7 +819,7 @@ proc display_file {path state} {
                $new_w image create $lno.0 \
                        -align center -padx 5 -pady 1 \
                        -name [lindex $s 1] \
-                       -image [mapicon $m $path]
+                       -image $new_icon
                $new_w insert $lno.1 "$path\n"
                $new_w conf -state disabled
        } elseif {$new_icon != [mapicon $old_m $path]} {