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();
|
||||
} else {
|
||||
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.
|
||||
SharedSurface* surf = mFront->Surf();
|
||||
@ -375,7 +376,7 @@ CanvasClientSharedSurface::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
||||
|
||||
newTex = TexClientFromReadback(surf, forwarder, flags, layersBackend);
|
||||
}
|
||||
MOZ_ASSERT(newTex);
|
||||
|
||||
if (!newTex) {
|
||||
// May happen in a release build in case of memory pressure.
|
||||
gfxCriticalError() << "Failed to allocate a TextureClient for SharedSurface Canvas. size: " << aSize;
|
||||
|
Loading…
Reference in New Issue
Block a user