Bug 959842. Add null checks whenever we borrow a draw target from RotatedBuffer. r=kats

This commit is contained in:
Nicholas Cameron 2014-01-17 09:52:52 +13:00
parent b8cac0204a
commit a40bda6b8c

View File

@ -630,6 +630,9 @@ ContentClientDoubleBuffered::UpdateDestinationFrom(const RotatedBuffer& aSource,
{
DrawTarget* destDT =
BorrowDrawTargetForQuadrantUpdate(aUpdateRegion.GetBounds(), BUFFER_BLACK);
if (!destDT) {
return;
}
bool isClippingCheap = IsClippingCheap(destDT, aUpdateRegion);
if (isClippingCheap) {
@ -646,6 +649,9 @@ ContentClientDoubleBuffered::UpdateDestinationFrom(const RotatedBuffer& aSource,
MOZ_ASSERT(HaveBufferOnWhite());
DrawTarget* destDT =
BorrowDrawTargetForQuadrantUpdate(aUpdateRegion.GetBounds(), BUFFER_WHITE);
if (!destDT) {
return;
}
bool isClippingCheap = IsClippingCheap(destDT, aUpdateRegion);
if (isClippingCheap) {
@ -882,6 +888,9 @@ DeprecatedContentClientDoubleBuffered::UpdateDestinationFrom(const RotatedBuffer
MOZ_ASSERT(HaveBufferOnWhite());
DrawTarget* destDT =
BorrowDrawTargetForQuadrantUpdate(aUpdateRegion.GetBounds(), BUFFER_WHITE);
if (!destDT) {
return;
}
bool isClippingCheap = IsClippingCheap(destDT, aUpdateRegion);
if (isClippingCheap) {