diff options
author | dgp <dgp@users.sourceforge.net> | 2018-11-16 17:44:47 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2018-11-16 17:44:47 (GMT) |
commit | 7cbc10dfbeb569d6f01c2c49a3d14697ba26c03a (patch) | |
tree | 375ff0868f4a7549bb2a96dadf08b955edb54855 /generic | |
parent | c37774eec0a06f4966f97ae6605ee85ff7bb635d (diff) | |
download | tk-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.c | 9 |
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) { |