diff --git a/src/GraphDisplay.cpp b/src/GraphDisplay.cpp index 116ae9fc3a..a5b8ee4c73 100644 --- a/src/GraphDisplay.cpp +++ b/src/GraphDisplay.cpp @@ -288,6 +288,14 @@ public: { StageStats *pStageStats = Luna::check( L, 1 ); PlayerStageStats *pPlayerStageStats = Luna::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; }