Index: generic/nsf.c =================================================================== diff -u -r96f4410aa6510a664938b6ef6e5d43c3a3a18d68 -r800c3a0dfde0bae4bb77dafc1856921b75143202 --- generic/nsf.c (.../nsf.c) (revision 96f4410aa6510a664938b6ef6e5d43c3a3a18d68) +++ generic/nsf.c (.../nsf.c) (revision 800c3a0dfde0bae4bb77dafc1856921b75143202) @@ -13970,6 +13970,22 @@ rst = RUNTIME_STATE(interp); /* + * If for some strange reason the runtime state is already deleted, don't + * crash. + */ + if (unlikely(rst == NULL)) { + + if ((Tcl_Interp_flags(interp) & DELETED)) { + return TCL_OK; + } + } + /* + * In all other cases (aside of the DELETED interp), we expect a runtime + * state. If this is violated, flag this via exception in development mode. + */ + assert(rst != NULL); + + /* * Don't call destroy after exit handler started physical * destruction, or when it was called already before */