Bug 1691640 - Add nullptr check to MapTexture() r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D104498
This commit is contained in:
sotaro 2021-02-09 10:26:19 +00:00
Родитель 7dfc35949f
Коммит 2dc1d9cd2b
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -76,6 +76,10 @@ static bool MapTexture(T* aHost, RenderCompositor* aCompositor,
RefPtr<ID3D11DeviceContext>& aDeviceContext, RefPtr<ID3D11DeviceContext>& aDeviceContext,
RefPtr<ID3D11Texture2D>& aCpuTexture, RefPtr<ID3D11Texture2D>& aCpuTexture,
D3D11_MAPPED_SUBRESOURCE& aMappedSubresource) { D3D11_MAPPED_SUBRESOURCE& aMappedSubresource) {
if (!aCompositor) {
return false;
}
RenderCompositorD3D11SWGL* compositor = RenderCompositorD3D11SWGL* compositor =
aCompositor->AsRenderCompositorD3D11SWGL(); aCompositor->AsRenderCompositorD3D11SWGL();
if (!compositor) { if (!compositor) {