Subject: Fixed bug [3137232] - spinbox error after destroying toplevel from widget (cherrypicked [e6d91ca077]

From: fvogel <[email-masked]>
Date: Mon, 7 Mar 2016 07:25:34 +0000

---
 library/spinbox.tcl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/library/spinbox.tcl b/library/spinbox.tcl
index 02584f4..fecf7d6 100644
--- a/library/spinbox.tcl
+++ b/library/spinbox.tcl
@@ -299,6 +299,10 @@ bind Spinbox <B2-Motion> {
 proc ::tk::spinbox::Invoke {w elem} {
     variable ::tk::Priv
 
+    if {![winfo exists $w]} {
+      return
+    }
+
     if {![info exists Priv(outsideElement)]} {
 	$w invoke $elem
 	incr Priv(repeated)
-- 
cgit v0.12