Make sure that stack is properly initialized on a per-thread basis. Fixes #95wq

This commit is contained in:
Jason Turner
2010-07-23 20:00:17 +00:00
parent f7086c10ec
commit f5f99961c1
2 changed files with 4 additions and 3 deletions

View File

@@ -209,8 +209,6 @@ namespace chaiscript
Dispatch_Engine()
: m_place_holder(boost::shared_ptr<Placeholder_Object>(new Placeholder_Object()))
{
StackData &stack = get_stack_data();
stack.get<1>().push_back(Scope());
}
~Dispatch_Engine()
@@ -748,6 +746,7 @@ namespace chaiscript
Stack_Holder()
: stack(new StackData())
{
stack->get<1>().push_back(Scope());
stack->get<2>() = true;
}