GraphDisplay now checks whether the stats it's passed from Lua are nil.
This commit is contained in:
@@ -288,6 +288,14 @@ public:
|
|||||||
{
|
{
|
||||||
StageStats *pStageStats = Luna<StageStats>::check( L, 1 );
|
StageStats *pStageStats = Luna<StageStats>::check( L, 1 );
|
||||||
PlayerStageStats *pPlayerStageStats = Luna<PlayerStageStats>::check( L, 2 );
|
PlayerStageStats *pPlayerStageStats = Luna<PlayerStageStats>::check( L, 2 );
|
||||||
|
if(pStageStats == NULL)
|
||||||
|
{
|
||||||
|
luaL_error(L, "The StageStats passed to GraphDisplay:Set are nil.");
|
||||||
|
}
|
||||||
|
if(pPlayerStageStats == NULL)
|
||||||
|
{
|
||||||
|
luaL_error(L, "The PlayerStageStats passed to GraphDisplay:Set are nil.");
|
||||||
|
}
|
||||||
p->Set( *pStageStats, *pPlayerStageStats );
|
p->Set( *pStageStats, *pPlayerStageStats );
|
||||||
COMMON_RETURN_SELF;
|
COMMON_RETURN_SELF;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user