Fixed a crash when textures contain non-existing patches

This commit is contained in:
biwa 2021-05-29 19:40:39 +02:00
parent cc85d10ebc
commit 3e9d86e4b3

View file

@ -158,7 +158,7 @@ namespace CodeImp.DoomBuilder.Data
// Check which columns have more than one patch
foreach(TexturePatch p in patches)
{
if (patchbmps[p] == null) continue;
if (!patchbmps.ContainsKey(p) || patchbmps[p] == null) continue;
bool ismaked = BitmapIsMasked(patchbmps[p]);