소스 검색

make sure device and texture manager are still around when making a deletion request of them

AzaezelX 3 달 전
부모
커밋
aebd497fd6
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      Engine/source/gfx/gfxTextureObject.cpp

+ 2 - 1
Engine/source/gfx/gfxTextureObject.cpp

@@ -144,7 +144,8 @@ GFXTextureObject::~GFXTextureObject()
 
 void GFXTextureObject::destroySelf()
 {
-   mDevice->mTextureManager->requestDeleteTexture(this);
+   if (mDevice && mDevice->mTextureManager)
+      mDevice->mTextureManager->requestDeleteTexture(this);
 }
 
 //-----------------------------------------------------------------------------