Bug 1250669. Don't init dwrite fonts if content device creation fails. r=dvander

This commit is contained in:
Mason Chang 2016-02-25 10:44:57 -08:00
Родитель f4831794e7
Коммит 52dbcf6556
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -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);