Fix crash if lua_tostring() returns NULL.

This commit is contained in:
Steve Checkoway
2006-09-21 09:42:08 +00:00
parent 95faef1776
commit 1598deda7f
2 changed files with 16 additions and 6 deletions
+1 -2
View File
@@ -169,8 +169,7 @@ void PercentageDisplay::Refresh()
ASSERT( !lua_isnil(L, -1) );
LuaHelpers::Push( fPercentDancePoints, L );
lua_call( L, 1, 1 ); // 1 args, 1 result
sNumToDisplay = lua_tostring( L, -1 );
lua_pop( L, 1 );
LuaHelpers::Pop( sNumToDisplay, L );
LUA->Release(L);
// HACK: Use the last frame in the numbers texture as '-'