From 933c87eb215123d49744db1b23fd5a3a5230f553 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 13 Oct 2006 03:36:00 +0000 Subject: [PATCH] error handling --- stepmania/src/ActorUtil.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 08e48518a3..814f475e1d 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -343,6 +343,15 @@ namespace return NULL; } + if( lua_type(L, -1) != LUA_TTABLE ) + { + lua_pop( L, 1 ); + LUA->Release( L ); + sError = ssprintf( "%s: must return a table", sFile.c_str() ); + Dialog::OK( sError, "LUA_ERROR" ); + return NULL; + } + XNode *pRet = XmlFileUtil::XNodeFromTable( L ); LUA->Release( L );