Print warning message in console if line->next is NULL

This commit is contained in:
Monster Iestyn 2017-04-01 20:16:48 +01:00
parent 8f25dc62cc
commit bf29b5c6d1
1 changed files with 4 additions and 1 deletions

View File

@ -3039,7 +3039,10 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
case 443: // Calls a named Lua function
#ifdef HAVE_BLUA
LUAh_LinedefExecute(line, mo, callsec);
if (line->text)
LUAh_LinedefExecute(line, mo, callsec);
else
CONS_Alert(CONS_WARNING, "Linedef %d is missing the hook name of the Lua function to call! (This should be given in the front texture fields)\n", line-lines);
#else
CONS_Alert(CONS_ERROR, "The map is trying to run a Lua script, but this exe was not compiled with Lua support!\n");
#endif