Fix crash if lua_tostring() returns NULL. (Maybe not accepting NULL in RString wasn't a good idea.)

This commit is contained in:
Steve Checkoway
2006-09-21 07:33:51 +00:00
parent d2df988807
commit 3943ba773c
+1 -2
View File
@@ -588,8 +588,7 @@ bool LuaHelpers::RunExpressionS( const RString &str, RString &sOut )
if( lua_isfunction( L, -1 ) )
RageException::Throw( "Result is a function; did you forget \"()\"?" );
sOut = lua_tostring( L, -1 );
lua_pop( L, 1 );
LuaHelpers::Pop( sOut, L );
LUA->Release( L );
return true;