mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
Bug 704143 - Null check to avoid crashing. r=bas
This commit is contained in:
parent
d606eeadd6
commit
ac37bbd111
@ -1292,6 +1292,12 @@ nsCanvasRenderingContext2DAzure::InitializeWithTarget(DrawTarget *target, PRInt3
|
||||
if (!target)
|
||||
{
|
||||
mTarget = gfxPlatform::GetPlatform()->CreateOffscreenDrawTarget(IntSize(1, 1), FORMAT_B8G8R8A8);
|
||||
if (!mTarget) {
|
||||
// SupportsAzure() is controlled by the "gfx.canvas.azure.prefer-skia"
|
||||
// pref so that may be the reason rather than an OOM.
|
||||
mValid = false;
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
} else {
|
||||
mValid = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user