Skip to content

Commit

Permalink
git-gui: Don't crash when starting gitk from a browser session
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce committed Oct 3, 2007
1 parent 501e4c6 commit 906ab7f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} {
Expand Down

0 comments on commit 906ab7f

Please sign in to comment.