diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index a88723549aef..a11d4077aea9 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -2526,6 +2526,13 @@ gfxWindowsPlatform::InitializeD2D() return; } + // If we don't have a content device, don't init + // anything else below such as dwrite + if (!mD3D11ContentDevice) { + mD2D1Status = FeatureStatus::Failed; + return; + } + if (!mCompositorD3D11TextureSharingWorks) { mD2D1Status = FeatureStatus::Failed; return; @@ -2537,11 +2544,6 @@ gfxWindowsPlatform::InitializeD2D() return; } - if (!mD3D11ContentDevice) { - mD2D1Status = FeatureStatus::Failed; - return; - } - mD2D1Status = FeatureStatus::Available; Factory::SetDirect3D11Device(mD3D11ContentDevice);