Bug 1230913 - modified assert in order to prevent null pointer dereference. r=roc

--HG--
extra : rebase_source : d0735da955caaa36dfd74100479b0114a140a926
This commit is contained in:
Bogdan Postelnicu 2015-12-14 00:01:00 +01:00
parent f3df212995
commit df2e5b8773

View File

@ -843,7 +843,8 @@ TextureClient::CreateWithBufferSize(ISurfaceAllocator* aAllocator,
size_t aSize,
TextureFlags aTextureFlags)
{
MOZ_ASSERT(aAllocator->IPCOpen());
// also test the validity of aAllocator
MOZ_ASSERT(aAllocator && aAllocator->IPCOpen());
if (!aAllocator || !aAllocator->IPCOpen()) {
return nullptr;
}