mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- don't crash when destroying incomplete textures.
This can happen during TEXTURES parsing in case of an error.
This commit is contained in:
parent
b6c5232fea
commit
6ba4295136
1 changed files with 5 additions and 2 deletions
|
@ -96,8 +96,11 @@ void FGameTexture::Setup(FTexture *wrap)
|
|||
|
||||
FGameTexture::~FGameTexture()
|
||||
{
|
||||
FGameTexture* link = fileSystem.GetLinkedTexture(GetSourceLump());
|
||||
if (link == this) fileSystem.SetLinkedTexture(GetSourceLump(), nullptr);
|
||||
if (Base != nullptr)
|
||||
{
|
||||
FGameTexture* link = fileSystem.GetLinkedTexture(GetSourceLump());
|
||||
if (link == this) fileSystem.SetLinkedTexture(GetSourceLump(), nullptr);
|
||||
}
|
||||
if (SoftwareTexture != nullptr)
|
||||
{
|
||||
delete SoftwareTexture;
|
||||
|
|
Loading…
Reference in a new issue