Fix crash bug with Lua frame event handler destruction.