summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-11-19 21:59:11 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-11-19 21:59:11 (GMT)
commit450aa9743dee157400ca5b3227922914f1c434a0 (patch)
tree81a1f2e9456e1a7a254971a80110ea5e72c8710a /generic/tkTextDisp.c
parent811bb84daa1769e2840edf52bdc5922d8370d930 (diff)
downloadtk-450aa9743dee157400ca5b3227922914f1c434a0.zip
tk-450aa9743dee157400ca5b3227922914f1c434a0.tar.gz
tk-450aa9743dee157400ca5b3227922914f1c434a0.tar.bz2
Tcl_Preserve should be first I guess
Diffstat (limited to 'generic/tkTextDisp.c')
-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)");