mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- fixed crash during autoloading of material textures
https://forum.zdoom.org/viewtopic.php?t=60546
This commit is contained in:
parent
a7e7db1fe9
commit
2c2b19bb7f
1 changed files with 5 additions and 2 deletions
|
@ -1050,9 +1050,12 @@ void FTextureManager::Init()
|
|||
InitPalettedVersions();
|
||||
AdjustSpriteOffsets();
|
||||
// Add auto materials to each texture after everything has been set up.
|
||||
for (auto &tex : Textures)
|
||||
// Textures array can be reallocated in process, so ranged for loop is not suitable.
|
||||
// There is no need to process discovered material textures here,
|
||||
// CheckForTexture() did this already.
|
||||
for (unsigned int i = 0, count = Textures.Size(); i < count; ++i)
|
||||
{
|
||||
tex.Texture->AddAutoMaterials();
|
||||
Textures[i].Texture->AddAutoMaterials();
|
||||
}
|
||||
|
||||
glLight = TexMan.CheckForTexture("glstuff/gllight.png", ETextureType::MiscPatch);
|
||||
|
|
Loading…
Reference in a new issue