diff --git a/gfx/layers/d3d11/CompositorD3D11.cpp b/gfx/layers/d3d11/CompositorD3D11.cpp index f66af622529c..c4e7ee8f69ba 100644 --- a/gfx/layers/d3d11/CompositorD3D11.cpp +++ b/gfx/layers/d3d11/CompositorD3D11.cpp @@ -546,9 +546,7 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, const IntSize& srcSize = sourceD3D11->GetSize(); MOZ_ASSERT(srcSize.width >= 0 && srcSize.height >= 0, "render targets should have nonnegative sizes"); - if (srcBox.left >= 0 && - srcBox.top >= 0 && - srcBox.left < srcBox.right && + if (srcBox.left < srcBox.right && srcBox.top < srcBox.bottom && srcBox.right <= static_cast(srcSize.width) && srcBox.bottom <= static_cast(srcSize.height)) {