summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rw-r--r--Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp
index 48c82c4b..48e33434 100644
--- a/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp
@@ -39,8 +39,9 @@ TextureBaseD3D11 :: TextureBaseD3D11(IReferenceCounters* pRefCounters,
const TextureData* pInitData /*= nullptr*/) :
TTextureBase(pRefCounters, TexViewObjAllocator, pRenderDeviceD3D11, TexDesc)
{
- if( TexDesc.Usage == USAGE_STATIC && (pInitData == nullptr || pInitData->pSubResources == nullptr))
- LOG_ERROR_AND_THROW("Static textures must be initialized with data at creation time");
+ if (m_Desc.Usage == USAGE_STATIC && (pInitData == nullptr || pInitData->pSubResources == nullptr))
+ LOG_ERROR_AND_THROW("Static textures must be initialized with data at creation time: pInitData can't be null");
+
SetState(RESOURCE_STATE_UNDEFINED);
}