GraphDisplay now checks whether the stats it's passed from Lua are nil.

This commit is contained in:
Kyzentun
2015-01-15 17:25:16 -07:00
parent 259ef96493
commit 6b41f568bf
+8
View File
@@ -288,6 +288,14 @@ public:
{
StageStats *pStageStats = Luna<StageStats>::check( L, 1 );
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 );
COMMON_RETURN_SELF;
}