Bug 1326292 - Add null check of drawTarget in WinCompositorWidget.cpp, to avoid crash. r=jimm

--HG--
extra : rebase_source : 4f5043404a12efc975c0985fa67e669bca3951f8
This commit is contained in:
Tracy Walker 2017-02-08 09:06:49 -06:00
parent e703455691
commit 8fe6049207

View File

@ -282,6 +282,9 @@ WinCompositorWidget::ClearTransparentWindow()
if (!size.IsEmpty()) {
RefPtr<DrawTarget> drawTarget =
gfxPlatform::CreateDrawTargetForSurface(mTransparentSurface, size);
if (!drawTarget) {
return;
}
drawTarget->ClearRect(Rect(0, 0, size.width, size.height));
RedrawTransparentWindow();
}