- moved the 'no player start' check to the end of G_DoLoadLevel because inside G_FinishTravel it would leave some data in undefined places that later can cause a crash.

This commit is contained in:
Christoph Oelckers 2017-04-25 19:55:05 +02:00
parent 9375edda11
commit 090502b243
2 changed files with 2 additions and 1 deletions

View file

@ -468,7 +468,7 @@ enum
void G_ChangeLevel(const char *levelname, int position, int flags, int nextSkill=-1); void G_ChangeLevel(const char *levelname, int position, int flags, int nextSkill=-1);
void G_StartTravel (); void G_StartTravel ();
void G_FinishTravel (); int G_FinishTravel ();
void G_DoLoadLevel (int position, bool autosave); void G_DoLoadLevel (int position, bool autosave);

View file

@ -2073,6 +2073,7 @@ public:
else if (sc.Compare("sector")) else if (sc.Compare("sector"))
{ {
sector_t sec; sector_t sec;
memset(&sec, 0, sizeof(sector_t));
ParseSector(&sec, ParsedSectors.Size()); ParseSector(&sec, ParsedSectors.Size());
ParsedSectors.Push(sec); ParsedSectors.Push(sec);
} }