From 5fa980a7a3b92c8689f793cc5c7b7d7086f8f7c7 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 15 Feb 2007 11:22:25 +0000 Subject: [PATCH] fix assertion. PushAttrValue always pushes something; if no value, then it pushes nil (like lua_gettable) --- stepmania/src/ActorScroller.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ActorScroller.cpp b/stepmania/src/ActorScroller.cpp index 351643ed67..f7c599dcb0 100644 --- a/stepmania/src/ActorScroller.cpp +++ b/stepmania/src/ActorScroller.cpp @@ -126,11 +126,12 @@ void ActorScroller::LoadFromNode( const XNode *pNode ) ActorScroller::SetSecondsPerItem( fSecondsPerItem ); Lua *L = LUA->Get(); - if( pNode->PushAttrValue(L, "TransformFunction") ) + pNode->PushAttrValue( L, "TransformFunction" ); { LuaReference ref; ref.SetFromStack( L ); - SetTransformFromReference( ref ); + if( !ref.IsNil() ) + SetTransformFromReference( ref ); } LUA->Release( L );