diff --git a/BeefySysLib/platform/win/DXRenderDevice.cpp b/BeefySysLib/platform/win/DXRenderDevice.cpp index 12619328..4bc3bf56 100644 --- a/BeefySysLib/platform/win/DXRenderDevice.cpp +++ b/BeefySysLib/platform/win/DXRenderDevice.cpp @@ -254,6 +254,9 @@ DXTexture::DXTexture() DXTexture::~DXTexture() { + if (!mPath.IsEmpty()) + ((DXRenderDevice*)mRenderDevice)->mTextureMap.Remove(mPath); + //OutputDebugStrF("DXTexture::~DXTexture %@\n", this); delete mImageData; if (mD3DResourceView != NULL)