From c3fedd421881b757be7417bb3a130fcc9936e39c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 8 Jul 2019 11:17:03 +0300 Subject: [PATCH] - fixed crash on starting ACS script without level https://forum.zdoom.org/viewtopic.php?t=65287 --- src/d_net.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/d_net.cpp b/src/d_net.cpp index d04fda6664..bcf3153006 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -2730,6 +2730,12 @@ void Net_DoCommand (int type, uint8_t **stream, int player) // Used by DEM_RUNSCRIPT, DEM_RUNSCRIPT2, and DEM_RUNNAMEDSCRIPT 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 i;