summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextDisp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 8f72be0..a8a8f85 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -2946,8 +2946,9 @@ AsyncUpdateLineMetrics(
*/
if (textPtr->afterSyncCmd != NULL) {
- int code = Tcl_EvalObjEx(textPtr->interp, textPtr->afterSyncCmd, TCL_EVAL_GLOBAL);
+ int code;
Tcl_Preserve((ClientData)textPtr->interp);
+ code = Tcl_EvalObjEx(textPtr->interp, textPtr->afterSyncCmd, TCL_EVAL_GLOBAL);
if (code != TCL_OK && code != TCL_CONTINUE
&& code != TCL_BREAK) {
Tcl_AddErrorInfo(textPtr->interp, "\n (text yupdate)");