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

This commit is contained in:
Andi-Bogdan Postelnicu 2015-12-14 00:00:00 +01:00
Родитель 706c70f0da
Коммит f91d783b13
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -820,7 +820,8 @@ TextureClient::CreateForRawBufferAccess(ISurfaceAllocator* 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;
}