Bug 1042946 - Discard back buffer on error in ClientTiledLayerBuffer::ValidateTile() r=nical

This commit is contained in:
Sotaro Ikeda 2014-07-24 06:40:17 -07:00
Родитель 602f051355
Коммит f73d5b099c
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -914,9 +914,10 @@ ClientTiledLayerBuffer::ValidateTile(TileClient aTile,
mManager->GetTexturePool(gfxPlatform::GetPlatform()->Optimal2DFormatForContent(GetContentType())),
&createdTextureClient, !usingSinglePaintBuffer);
if (!backBuffer->Lock(OpenMode::OPEN_READ_WRITE)) {
if (!backBuffer || !backBuffer->Lock(OpenMode::OPEN_READ_WRITE)) {
NS_WARNING("Failed to lock tile TextureClient for updating.");
aTile.DiscardFrontBuffer();
aTile.DiscardBackBuffer();
return aTile;
}