diff options
author | fvogel <fvogelnew1@free.fr> | 2016-05-03 17:12:24 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-05-03 17:12:24 (GMT) |
commit | 473bb5cc9b6b28dc7dca5eb9d71b8da7bffac369 (patch) | |
tree | c0830a6a3eb0bed28895c61139b30b1d0943848b /tests | |
parent | b1abab58282cc8ff89e73762114369e7a11ce07f (diff) | |
parent | b9aa9a5d2da795de9a7bad7448cc5af7c2c8dd86 (diff) | |
download | tk-473bb5cc9b6b28dc7dca5eb9d71b8da7bffac369.zip tk-473bb5cc9b6b28dc7dca5eb9d71b8da7bffac369.tar.gz tk-473bb5cc9b6b28dc7dca5eb9d71b8da7bffac369.tar.bz2 |
Fixed [011706ec42] - tk::ButtonInvoke safety bug
Diffstat (limited to 'tests')
-rw-r--r-- | tests/button.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/button.test b/tests/button.test index 6d924f6..708fc30 100644 --- a/tests/button.test +++ b/tests/button.test @@ -3908,6 +3908,24 @@ test button-13.8 {size behavior: checkbutton} -setup { destroy .a .b .c } -result {1 1 1} +test button-14.1 {bug fix: [011706ec42] tk::ButtonInvoke unsafe wrt widget destruction} -body { + proc destroy_button {} { + if {[winfo exists .top.b]} { + destroy .top.b + } + } + toplevel .top + button .top.b -text Foo -command destroy_button + bind .top.b <space> destroy_button + pack .top.b + focus -force .top.b + update + event generate .top.b <space> + update ; # shall not trigger error invalid command name ".top.b" +} -cleanup { + destroy .top.b .top +} -result {} + imageFinish cleanupTests return |