mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Fixed a crash when trying to create a texture from an unnamed TEXTURE1/2 entry.
This commit is contained in:
parent
703343c05b
commit
0c8b91f443
2 changed files with 5 additions and 6 deletions
|
@ -163,12 +163,11 @@ namespace CodeImp.DoomBuilder.Data
|
|||
// This loads the textures
|
||||
public override ICollection<ImageData> LoadTextures(PatchNames pnames)
|
||||
{
|
||||
Dictionary<long, ImageData> images = new Dictionary<long, ImageData>();
|
||||
ICollection<ImageData> collection;
|
||||
List<ImageData> imgset = new List<ImageData>();
|
||||
|
||||
// Error when suspended
|
||||
if(issuspended) throw new Exception("Data reader is suspended");
|
||||
|
||||
Dictionary<long, ImageData> images = new Dictionary<long, ImageData>();
|
||||
ICollection<ImageData> collection;
|
||||
|
||||
// Load from wad files (NOTE: backward order, because the last wad's images have priority)
|
||||
for(int i = wads.Count - 1; i >= 0; i--)
|
||||
|
@ -186,7 +185,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
}
|
||||
|
||||
// Load TEXTURE1 lump file
|
||||
imgset.Clear();
|
||||
List<ImageData> imgset = new List<ImageData>();
|
||||
string texture1file = FindFirstFile("TEXTURE1", false);
|
||||
if((texture1file != null) && FileExists(texture1file))
|
||||
{
|
||||
|
|
|
@ -502,7 +502,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
}
|
||||
|
||||
// Add image to collection
|
||||
images.Add(image);
|
||||
if(image != null) images.Add(image);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue