mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1156058 - Null pointer check. r=jgilbert
--HG-- extra : rebase_source : a54cee6a3ce6c8fd64cbfacd86fb470de738ee52
This commit is contained in:
parent
cca934f12e
commit
698d695b89
@ -356,10 +356,11 @@ CanvasClientSharedSurface::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
|||||||
mFront->Surf()->Fence();
|
mFront->Surf()->Fence();
|
||||||
} else {
|
} else {
|
||||||
mFront = gl->Screen()->Front();
|
mFront = gl->Screen()->Front();
|
||||||
if (!mFront)
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
MOZ_ASSERT(mFront);
|
if (!mFront) {
|
||||||
|
gfxCriticalError() << "Invalid canvas front buffer";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Alright, now sort out the IPC goop.
|
// Alright, now sort out the IPC goop.
|
||||||
SharedSurface* surf = mFront->Surf();
|
SharedSurface* surf = mFront->Surf();
|
||||||
@ -375,7 +376,7 @@ CanvasClientSharedSurface::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
|||||||
|
|
||||||
newTex = TexClientFromReadback(surf, forwarder, flags, layersBackend);
|
newTex = TexClientFromReadback(surf, forwarder, flags, layersBackend);
|
||||||
}
|
}
|
||||||
MOZ_ASSERT(newTex);
|
|
||||||
if (!newTex) {
|
if (!newTex) {
|
||||||
// May happen in a release build in case of memory pressure.
|
// May happen in a release build in case of memory pressure.
|
||||||
gfxCriticalError() << "Failed to allocate a TextureClient for SharedSurface Canvas. size: " << aSize;
|
gfxCriticalError() << "Failed to allocate a TextureClient for SharedSurface Canvas. size: " << aSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user