diff options
author | fvogel <fvogel@noemail.net> | 2016-04-29 19:07:53 (GMT) |
---|---|---|
committer | fvogel <fvogel@noemail.net> | 2016-04-29 19:07:53 (GMT) |
commit | 8f724e224574d12bd843da6c3451537f7ee89a14 (patch) | |
tree | f00a53a7996680c5a1f56f994e72da5b4fb7eed2 /library | |
parent | 611537d5b606c7f23b0eeb4600360403a512ca5e (diff) | |
download | tk-8f724e224574d12bd843da6c3451537f7ee89a14.zip tk-8f724e224574d12bd843da6c3451537f7ee89a14.tar.gz tk-8f724e224574d12bd843da6c3451537f7ee89a14.tar.bz2 |
Fixed [011706ec42] - tk::ButtonInvoke safety bug
FossilOrigin-Name: 2be097f06deb8c429db3528ed6444b23be8e819e
Diffstat (limited to 'library')
-rw-r--r-- | library/button.tcl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/button.tcl b/library/button.tcl index b2bafb2..061069a 100644 --- a/library/button.tcl +++ b/library/button.tcl @@ -597,14 +597,16 @@ proc ::tk::ButtonUp w { # w - The name of the widget. proc ::tk::ButtonInvoke w { - if {[$w cget -state] ne "disabled"} { + if {[winfo exists $w] && [$w cget -state] ne "disabled"} { set oldRelief [$w cget -relief] set oldState [$w cget -state] $w configure -state active -relief sunken update idletasks after 100 - $w configure -state $oldState -relief $oldRelief - uplevel #0 [list $w invoke] + if {[winfo exists $w]} { + $w configure -state $oldState -relief $oldRelief + uplevel #0 [list $w invoke] + } } } |