mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
Bug 847002 - Guard against going into codepaths that assume GetLayerManager doesn't return null. r=Cwiiis
This commit is contained in:
parent
9e1ff5daa6
commit
f17356ad95
@ -939,7 +939,7 @@ bool
|
||||
nsWindow::DrawTo(gfxASurface *targetSurface, const nsIntRect &invalidRect)
|
||||
{
|
||||
mozilla::layers::RenderTraceScope trace("DrawTo", "717171");
|
||||
if (!mIsVisible || !mWidgetListener)
|
||||
if (!mIsVisible || !mWidgetListener || !GetLayerManager(nullptr))
|
||||
return false;
|
||||
|
||||
nsRefPtr<nsWindow> kungFuDeathGrip(this);
|
||||
@ -2328,7 +2328,7 @@ nsWindow::WidgetPaintsBackground()
|
||||
bool
|
||||
nsWindow::NeedsPaint()
|
||||
{
|
||||
if (sCompositorPaused || FindTopLevel() != nsWindow::TopWindow()) {
|
||||
if (sCompositorPaused || FindTopLevel() != nsWindow::TopWindow() || !GetLayerManager(nullptr)) {
|
||||
return false;
|
||||
}
|
||||
return nsIWidget::NeedsPaint();
|
||||
|
Loading…
Reference in New Issue
Block a user