1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Shutdown fix

This commit is contained in:
Brian Fiete 2021-05-29 07:59:49 -04:00
parent d586af2f1d
commit 136c2b2211

View file

@ -254,7 +254,7 @@ DXTexture::DXTexture()
DXTexture::~DXTexture()
{
if (!mPath.IsEmpty())
if ((!mPath.IsEmpty()) && (mRenderDevice != NULL))
((DXRenderDevice*)mRenderDevice)->mTextureMap.Remove(mPath);
//OutputDebugStrF("DXTexture::~DXTexture %@\n", this);
@ -1486,6 +1486,9 @@ DXRenderDevice::DXRenderDevice()
DXRenderDevice::~DXRenderDevice()
{
for (auto& kv : mTextureMap)
kv.mValue->mRenderDevice = NULL;
mD3DVertexBuffer->Release();
mD3DIndexBuffer->Release();
delete mDefaultRenderState;