mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Shutdown fix
This commit is contained in:
parent
d586af2f1d
commit
136c2b2211
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue