DACSThinker can exist with no scripts

This commit is contained in:
Edward Richardson 2014-11-09 22:57:14 +13:00
parent e3640b5bf5
commit 5170abfeed

View file

@ -2892,7 +2892,7 @@ void DACSThinker::Serialize (FArchive &arc)
{ {
DLevelScript *script; DLevelScript *script;
script = Scripts; script = Scripts;
while (true) while (script)
{ {
scriptcount++; scriptcount++;
@ -2914,6 +2914,8 @@ void DACSThinker::Serialize (FArchive &arc)
// We are running through this list backwards, so the next entry is the last processed // We are running through this list backwards, so the next entry is the last processed
DLevelScript *next = NULL; DLevelScript *next = NULL;
arc << scriptcount; arc << scriptcount;
Scripts = NULL;
LastScript = NULL;
for (int i = 0; i < scriptcount; i++) for (int i = 0; i < scriptcount; i++)
{ {
arc << Scripts; arc << Scripts;