diff options
author | fvogel <fvogelnew1@free.fr> | 2016-04-29 19:07:53 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-04-29 19:07:53 (GMT) |
commit | fe445933c38a59e269197da7ad01187157358ab4 (patch) | |
tree | f00a53a7996680c5a1f56f994e72da5b4fb7eed2 /library | |
parent | fa289415c7aaacc173ab97665af201a54eae611a (diff) | |
download | tk-fe445933c38a59e269197da7ad01187157358ab4.zip tk-fe445933c38a59e269197da7ad01187157358ab4.tar.gz tk-fe445933c38a59e269197da7ad01187157358ab4.tar.bz2 |
Fixed [011706ec42] - tk::ButtonInvoke safety bug
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] + } } } |