gitk: Avoid a crash in selectline if commitinfo($id) isn't set
Occasionally I see a crash in selectline with commitinfo($id) not set. This makes sure it is set by calling getcommit $id if it isn't. Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
c9cfdc9601
commit
d76afb15ad
5
gitk
5
gitk
@ -1218,7 +1218,7 @@ proc chewcommits {} {
|
|||||||
if {$viewcomplete($curview)} {
|
if {$viewcomplete($curview)} {
|
||||||
global commitidx varctok
|
global commitidx varctok
|
||||||
global numcommits startmsecs
|
global numcommits startmsecs
|
||||||
global mainheadid commitinfo nullid
|
global mainheadid nullid
|
||||||
|
|
||||||
if {[info exists pending_select]} {
|
if {[info exists pending_select]} {
|
||||||
set row [first_real_row]
|
set row [first_real_row]
|
||||||
@ -5494,6 +5494,9 @@ proc selectline {l isnew} {
|
|||||||
$ctext conf -state normal
|
$ctext conf -state normal
|
||||||
clear_ctext
|
clear_ctext
|
||||||
set linknum 0
|
set linknum 0
|
||||||
|
if {![info exists commitinfo($id)]} {
|
||||||
|
getcommit $id
|
||||||
|
}
|
||||||
set info $commitinfo($id)
|
set info $commitinfo($id)
|
||||||
set date [formatdate [lindex $info 2]]
|
set date [formatdate [lindex $info 2]]
|
||||||
$ctext insert end "[mc "Author"]: [lindex $info 1] $date\n"
|
$ctext insert end "[mc "Author"]: [lindex $info 1] $date\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user