diff --git a/source/common/engine/sc_man.cpp b/source/common/engine/sc_man.cpp index af5d5d1c2..96c79538c 100644 --- a/source/common/engine/sc_man.cpp +++ b/source/common/engine/sc_man.cpp @@ -1119,7 +1119,7 @@ void FScanner::CheckOpen() { if (ScriptOpen == false) { - I_FatalError ("SC_ call before SC_Open()."); + I_Error ("SC_ call before SC_Open()."); } } diff --git a/source/core/searchpaths.cpp b/source/core/searchpaths.cpp index 9de094f72..d95dba02e 100644 --- a/source/core/searchpaths.cpp +++ b/source/core/searchpaths.cpp @@ -328,18 +328,20 @@ static TArray LoadCRCCache(void) try { - sc.OpenFile(cachepath); - while (sc.GetString()) + if (sc.OpenFile(cachepath)) { - crclist.Reserve(1); - auto &flentry = crclist.Last(); - flentry.FileName = sc.String; - sc.MustGetNumber(); - flentry.FileLength = sc.BigNumber; - sc.MustGetNumber(); - flentry.FileTime = sc.BigNumber; - sc.MustGetNumber(); - flentry.CRCValue = (unsigned)sc.BigNumber; + while (sc.GetString()) + { + crclist.Reserve(1); + auto &flentry = crclist.Last(); + flentry.FileName = sc.String; + sc.MustGetNumber(); + flentry.FileLength = sc.BigNumber; + sc.MustGetNumber(); + flentry.FileTime = sc.BigNumber; + sc.MustGetNumber(); + flentry.CRCValue = (unsigned)sc.BigNumber; + } } } catch (CRecoverableError &)