fixup! git-gui: fix exception when trying to stage with empty file list

This commit is contained in:
Johannes Schindelin
2017-05-29 17:17:23 +02:00
parent 26173ab246
commit 8b4e64d605

View File

@@ -2532,7 +2532,13 @@ proc toggle_or_diff {mode w args} {
}
}
set path [lindex $file_lists($w) [expr {$lno - 1}]]
if {![info exists file_lists]
|| ![info exists file_lists($w)]
|| [llength $file_lists($w)] < $lno - 1} {
set path {}
} else {
set path [lindex $file_lists($w) [expr {$lno - 1}]]
}
if {$path eq {}} {
set last_clicked {}
return