mirror of
https://github.com/git/git.git
synced 2024-06-03 14:36:10 +02:00
git-gui: Don't crash when starting gitk from a browser session
If the user has started git-gui from the command line as a browser we offer the gitk menu options but we didn't create the main status bar widget in the "." toplevel. Trying to access it while starting gitk just results in Tcl errors. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
501e4c6f23
commit
906ab7f6c0
10
git-gui.sh
10
git-gui.sh
|
@ -1125,11 +1125,17 @@ proc mapdesc {state path} {
|
|||
}
|
||||
|
||||
proc ui_status {msg} {
|
||||
$::main_status show $msg
|
||||
global main_status
|
||||
if {[info exists main_status]} {
|
||||
$main_status show $msg
|
||||
}
|
||||
}
|
||||
|
||||
proc ui_ready {{test {}}} {
|
||||
$::main_status show {Ready.} $test
|
||||
global main_status
|
||||
if {[info exists main_status]} {
|
||||
$main_status show [mc "Ready."] $test
|
||||
}
|
||||
}
|
||||
|
||||
proc escape_path {path} {
|
||||
|
|
Loading…
Reference in New Issue