summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-11-16 17:44:47 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-11-16 17:44:47 (GMT)
commit7cbc10dfbeb569d6f01c2c49a3d14697ba26c03a (patch)
tree375ff0868f4a7549bb2a96dadf08b955edb54855 /generic
parentc37774eec0a06f4966f97ae6605ee85ff7bb635d (diff)
downloadtk-7cbc10dfbeb569d6f01c2c49a3d14697ba26c03a.zip
tk-7cbc10dfbeb569d6f01c2c49a3d14697ba26c03a.tar.gz
tk-7cbc10dfbeb569d6f01c2c49a3d14697ba26c03a.tar.bz2
Crash prevention. Still buggy, now test text-11a.22 fails instead of crashing.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkText.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index 4c536a2..a0de1d5 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -5538,6 +5538,15 @@ RunAfterSyncCmd(
return;
}
+ if (textPtr->afterSyncCmd == NULL) {
+ /*
+ * [Bug 0a9c9151b5] Probably should have idle handlers coded so that
+ * this cannot happen, but a safety check here at least prevents a
+ * crash.
+ */
+ return;
+ }
+
Tcl_Preserve((ClientData) textPtr->interp);
code = Tcl_EvalObjEx(textPtr->interp, textPtr->afterSyncCmd, TCL_EVAL_GLOBAL);
if (code == TCL_ERROR) {