diff --git a/gfx/layers/d3d11/TextureD3D11.h b/gfx/layers/d3d11/TextureD3D11.h index e4d599eeceb3..1c4bb0936d64 100644 --- a/gfx/layers/d3d11/TextureD3D11.h +++ b/gfx/layers/d3d11/TextureD3D11.h @@ -239,7 +239,7 @@ public: virtual ID3D11ShaderResourceView* GetShaderResourceView() override; // Returns nullptr if this texture was created by a DXGI TextureHost. - virtual DataTextureSource* AsDataTextureSource() override { return mAllowTextureUploads ? this : false; } + virtual DataTextureSource* AsDataTextureSource() override { return mAllowTextureUploads ? this : nullptr; } virtual void DeallocateDeviceData() override { mTexture = nullptr; }