- fixed: the restart CCMD must clear out all statically stored pointers to VM functions because they do not survive the shutdown that is needed before loading new data.

This commit is contained in:
Christoph Oelckers 2017-01-31 13:41:23 +01:00
commit 3131c08640
6 changed files with 25 additions and 6 deletions

View file

@ -478,7 +478,7 @@ void cht_DoCheat (player_t *player, int cheat)
if (player->mo != NULL && player->health >= 0)
{
static VMFunction *gsp = nullptr;
if (gsp == nullptr) gsp = PClass::FindFunction(NAME_Sigil, NAME_GiveSigilPiece);
if (gsp == nullptr) PClass::FindFunction(&gsp, NAME_Sigil, NAME_GiveSigilPiece);
if (gsp)
{
VMValue params[1] = { player->mo };