- fixed crash on starting ACS script without level

https://forum.zdoom.org/viewtopic.php?t=65287
This commit is contained in:
alexey.lysiuk 2019-07-08 11:17:03 +03:00
parent 9332a63ce5
commit c3fedd4218
1 changed files with 6 additions and 0 deletions

View File

@ -2730,6 +2730,12 @@ void Net_DoCommand (int type, uint8_t **stream, int player)
// Used by DEM_RUNSCRIPT, DEM_RUNSCRIPT2, and DEM_RUNNAMEDSCRIPT // Used by DEM_RUNSCRIPT, DEM_RUNSCRIPT2, and DEM_RUNNAMEDSCRIPT
static void RunScript(uint8_t **stream, AActor *pawn, int snum, int argn, int always) static void RunScript(uint8_t **stream, AActor *pawn, int snum, int argn, int always)
{ {
if (pawn == nullptr)
{
// Scripts can be invoked without a level loaded, e.g. via puke(name) CCMD in fullscreen console
return;
}
int arg[4] = { 0, 0, 0, 0 }; int arg[4] = { 0, 0, 0, 0 };
int i; int i;