Browse Source

Allows use of an existing lua_State pointer instead of creating a new lua_State. Useful if you are integrating with code that already supports Lua.

David Wimsey 12 years ago
parent
commit
6c89651c58
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/Core/Lua/Interpreter.cpp

+ 2 - 2
Source/Core/Lua/Interpreter.cpp

@@ -216,8 +216,8 @@ void Interpreter::Initialise()
 
 
 void Interpreter::Initialise(lua_State *luaStatePointer)
 void Interpreter::Initialise(lua_State *luaStatePointer)
 {
 {
-	Interpreter iPtr = new Interpreter();
-	iPtr->_L = luaStatePointer
+	Interpreter *iPtr = new Interpreter();
+	iPtr->_L = luaStatePointer;
 	Rocket::Core::RegisterPlugin(iPtr);
 	Rocket::Core::RegisterPlugin(iPtr);
 }
 }