Bug 1374936: P2. Check for error. r?mattwoodrow
MozReview-Commit-ID: A8Cy3BsZS8h
--- a/dom/media/platforms/wmf/DXVA2Manager.cpp
+++ b/dom/media/platforms/wmf/DXVA2Manager.cpp
@@ -974,17 +974,18 @@ D3D11DXVA2Manager::CopyToBGRATexture(ID3
HRESULT hr;
RefPtr<ID3D11Texture2D> texture, inTexture;
inTexture = aInTexture;
CD3D11_TEXTURE2D_DESC desc;
aInTexture->GetDesc(&desc);
- ConfigureForSize(desc.Width, desc.Height);
+ hr = ConfigureForSize(desc.Width, desc.Height);
+ NS_ENSURE_TRUE(SUCCEEDED(hr), hr);
RefPtr<IDXGIKeyedMutex> mutex;
inTexture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
// The rest of this function will not work if inTexture implements
// IDXGIKeyedMutex! In that case case we would have to copy to a
// non-mutex using texture.
if (mutex) {