mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1626332 - null-check the canvas frame as it can be null in some documents.
Differential Revision: https://phabricator.services.mozilla.com/D69541 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
bb413bca06
commit
e5e8a82f19
@ -510,10 +510,11 @@ static void InvalidateImages(nsIFrame* aFrame, imgIRequest* aRequest,
|
||||
}
|
||||
|
||||
if (aFrame->IsPrimaryFrameOfRootOrBodyElement()) {
|
||||
// Try to invalidate the canvas too, in the probable case the background
|
||||
// was propagated to it.
|
||||
InvalidateImages(aFrame->PresShell()->GetCanvasFrame(), aRequest,
|
||||
aForcePaint);
|
||||
if (auto* canvas = aFrame->PresShell()->GetCanvasFrame()) {
|
||||
// Try to invalidate the canvas too, in the probable case the background
|
||||
// was propagated to it.
|
||||
InvalidateImages(canvas, aRequest, aForcePaint);
|
||||
}
|
||||
}
|
||||
|
||||
bool invalidateFrame = aForcePaint;
|
||||
|
Loading…
Reference in New Issue
Block a user