fix GAMESTATE:SetCurrentSteps
assert was causing crash if steps were set to nil/null.
This commit is contained in:
+1
-1
@@ -2269,7 +2269,7 @@ public:
|
||||
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
|
||||
if( lua_isnil(L,2) ) { p->m_pCurSteps[pn].Set( NULL ); }
|
||||
else { Steps *pS = Luna<Steps>::check(L,2); p->m_pCurSteps[pn].Set( pS ); }
|
||||
ASSERT(p->m_pCurSteps[pn]->m_StepsType == p->m_pCurStyle->m_StepsType);
|
||||
ASSERT( p->m_pCurSteps[pn] == NULL || p->m_pCurSteps[pn]->m_StepsType == p->m_pCurStyle->m_StepsType);
|
||||
return 0;
|
||||
}
|
||||
static int GetCurrentCourse( T* p, lua_State *L ) { if(p->m_pCurCourse) p->m_pCurCourse->PushSelf(L); else lua_pushnil(L); return 1; }
|
||||
|
||||
Reference in New Issue
Block a user