mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +00:00
ACC support: fixed a crash when trying to load non-existent include file.
This commit is contained in:
parent
95e28518cb
commit
4586c209a2
4 changed files with 5 additions and 6 deletions
|
@ -78,9 +78,8 @@ namespace CodeImp.DoomBuilder.Compilers
|
|||
foreach(string include in includes)
|
||||
{
|
||||
// Grab the script text from the resources
|
||||
TextResourceData data = General.Map.Data.LoadFile(include);
|
||||
|
||||
if(data.Stream != null)
|
||||
TextResourceData data = General.Map.Data.GetTextResourceData(include);
|
||||
if(data != null && data.Stream != null)
|
||||
{
|
||||
// Pull the pk3 or directory sub folder out if applicable
|
||||
FileInfo fi = new FileInfo(Path.Combine(this.tempdir.FullName, include));
|
||||
|
|
|
@ -177,7 +177,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
OnInclude = delegate(AcsParserSE se, string includefile, AcsParserSE.IncludeType includetype)
|
||||
{
|
||||
TextResourceData data = General.Map.Data.LoadFile(includefile);
|
||||
TextResourceData data = General.Map.Data.GetTextResourceData(includefile);
|
||||
if(data == null)
|
||||
{
|
||||
// Fial
|
||||
|
|
|
@ -2350,7 +2350,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
}
|
||||
|
||||
//mxd
|
||||
internal TextResourceData LoadFile(string name)
|
||||
internal TextResourceData GetTextResourceData(string name)
|
||||
{
|
||||
// Filesystem path?
|
||||
if(Path.IsPathRooted(name))
|
||||
|
|
|
@ -2157,7 +2157,7 @@ namespace CodeImp.DoomBuilder
|
|||
IgnoreErrors = true,
|
||||
OnInclude = delegate(AcsParserSE se, string includefile, AcsParserSE.IncludeType includetype)
|
||||
{
|
||||
TextResourceData includedata = General.Map.Data.LoadFile(includefile);
|
||||
TextResourceData includedata = General.Map.Data.GetTextResourceData(includefile);
|
||||
if(includedata != null)
|
||||
{
|
||||
includedata.Trackable = true;
|
||||
|
|
Loading…
Reference in a new issue