diff --git a/src/b_game.cpp b/src/b_game.cpp index 30c2c483b..807ec2b46 100644 --- a/src/b_game.cpp +++ b/src/b_game.cpp @@ -369,6 +369,7 @@ void FCajunMaster::DoAddBot (BYTE **stream) { multiplayer = true; //Prevents cheating and so on; emulates real netgame (almost). players[bnum].Bot = new DBot; + GC::WriteBarrier (players[bnum].Bot); players[bnum].Bot->skill = skill; playeringame[bnum] = true; players[bnum].mo = NULL; diff --git a/src/p_user.cpp b/src/p_user.cpp index 8980050e7..51105cd3d 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -3049,6 +3049,7 @@ void player_t::Serialize (FArchive &arc) if (SaveVersion < 4514 && IsBot) { Bot = new DBot; + GC::WriteBarrier (Bot); arc << Bot->angle << Bot->dest