Bug 1230911 - modified asseert in order to prevent null pointer dereference. r=roc

--HG--
extra : rebase_source : 04bbec02d594e0006ed127005a3cc653cb5e195f
This commit is contained in:
Bogdan Postelnicu 2015-12-13 23:59:00 +01:00
parent af49ee7fbe
commit ca7864726d

View File

@ -693,7 +693,8 @@ TextureClient::CreateForDrawing(CompositableForwarder* aAllocator,
TextureFlags aTextureFlags,
TextureAllocationFlags aAllocFlags)
{
MOZ_ASSERT(aAllocator->IPCOpen());
// also test the validity of aAllocator
MOZ_ASSERT(aAllocator && aAllocator->IPCOpen());
if (!aAllocator || !aAllocator->IPCOpen()) {
return nullptr;
}