mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 12:54:15 +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()
|
DXTexture::~DXTexture()
|
||||||
{
|
{
|
||||||
if (!mPath.IsEmpty())
|
if ((!mPath.IsEmpty()) && (mRenderDevice != NULL))
|
||||||
((DXRenderDevice*)mRenderDevice)->mTextureMap.Remove(mPath);
|
((DXRenderDevice*)mRenderDevice)->mTextureMap.Remove(mPath);
|
||||||
|
|
||||||
//OutputDebugStrF("DXTexture::~DXTexture %@\n", this);
|
//OutputDebugStrF("DXTexture::~DXTexture %@\n", this);
|
||||||
|
@ -1486,6 +1486,9 @@ DXRenderDevice::DXRenderDevice()
|
||||||
|
|
||||||
DXRenderDevice::~DXRenderDevice()
|
DXRenderDevice::~DXRenderDevice()
|
||||||
{
|
{
|
||||||
|
for (auto& kv : mTextureMap)
|
||||||
|
kv.mValue->mRenderDevice = NULL;
|
||||||
|
|
||||||
mD3DVertexBuffer->Release();
|
mD3DVertexBuffer->Release();
|
||||||
mD3DIndexBuffer->Release();
|
mD3DIndexBuffer->Release();
|
||||||
delete mDefaultRenderState;
|
delete mDefaultRenderState;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue