wipe thread state on destroy to prevent dangling pointer use

master
Daniel Kolesa 2021-04-04 19:40:15 +02:00
parent 9c2d375471
commit 7158a6979b
1 changed files with 1 additions and 0 deletions

View File

@ -274,6 +274,7 @@ LIBCUBESCRIPT_EXPORT void state::destroy() {
auto *sp = p_tstate->istate;
sp->destroy(p_tstate);
sp->destroy(sp);
p_tstate = nullptr;
}
state::state(internal_state *s) {