Bug 594779: Bail out when texture creation fails, to avoid NULL pointer dereference. r=vlad a=blocking-beta7 CLOSED TREE

This commit is contained in:
Bas Schouten 2010-09-27 04:57:40 +00:00
Родитель d2abe7bc5d
Коммит 818de29c8d
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -201,6 +201,12 @@ ThebesLayerD3D9::RenderLayer()
if (!mTexture) { if (!mTexture) {
CreateNewTexture(gfxIntSize(visibleRect.width, visibleRect.height)); CreateNewTexture(gfxIntSize(visibleRect.width, visibleRect.height));
if (!mTexture) {
NS_WARNING("Failed to create texture for thebes layer - not drawing.");
return;
}
mValidRegion.SetEmpty(); mValidRegion.SetEmpty();
} }