summaryrefslogtreecommitdiffstats
path: root/library/button.tcl
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-04-29 19:07:53 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-04-29 19:07:53 (GMT)
commitfe445933c38a59e269197da7ad01187157358ab4 (patch)
treef00a53a7996680c5a1f56f994e72da5b4fb7eed2 /library/button.tcl
parentfa289415c7aaacc173ab97665af201a54eae611a (diff)
downloadtk-fe445933c38a59e269197da7ad01187157358ab4.zip
tk-fe445933c38a59e269197da7ad01187157358ab4.tar.gz
tk-fe445933c38a59e269197da7ad01187157358ab4.tar.bz2
Fixed [011706ec42] - tk::ButtonInvoke safety bug
Diffstat (limited to 'library/button.tcl')
-rw-r--r--library/button.tcl8
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]
+ }
}
}