Index: ChangeLog ================================================================== --- ChangeLog +++ ChangeLog @@ -1,5 +1,10 @@ +2011-06-29 Don Porter + + * generic/ttk/ttkTrace.c: [Bug 3341056] Correct segfault due to flaw + * tests/ttk/ttk.test: in the 2011-06-17 commit. + 2011-06-23 Don Porter * changes: Updated for 8.5.10 release. 2011-06-17 Don Porter Index: generic/ttk/ttkTrace.c ================================================================== --- generic/ttk/ttkTrace.c +++ generic/ttk/ttkTrace.c @@ -134,11 +134,11 @@ /* * Search the traces on the variable to see if the one we are tasked * with removing is present. */ while ((cd = Tcl_VarTraceInfo(h->interp, Tcl_GetString(h->varnameObj), - 0, VarTraceProc, cd)) != NULL) { + TCL_GLOBAL_ONLY, VarTraceProc, cd)) != NULL) { if (cd == (ClientData) h) { break; } } /* Index: tests/ttk/ttk.test ================================================================== --- tests/ttk/ttk.test +++ tests/ttk/ttk.test @@ -558,15 +558,32 @@ test ttk-15.1 {Bug 3062331} -setup { destroy .b } -body { set Y {} ttk::button .b -textvariable Y - trace variable Y u "destroy .b" + trace variable Y u "destroy .b; #" unset Y } -cleanup { destroy .b } -result {} + +test ttk-15.2 {Bug 3341056} -setup { + proc foo {} { + destroy .lf + ttk::labelframe .lf + ttk::checkbutton .lf.cb -text xxx + } +} -body { + ttk::button .b -text xxx -command foo + .b invoke + .b invoke + .lf.cb invoke + destroy .b +} -cleanup { + rename foo {} + destroy .lf +} -result {} ## Test ensemble processing: # # (See also: SF#2021443) #