Bug 1208234: Stop the null pointer crash. r=bas

This commit is contained in:
Milan Sreckovic 2015-10-08 15:03:36 -07:00
parent c027acf669
commit dd53e02526

View File

@ -64,6 +64,11 @@ SourceSurfaceD2DTarget::GetDataSurface()
desc.BindFlags = 0;
desc.MiscFlags = 0;
if (!Factory::GetDirect3D10Device()) {
gfxCriticalError() << "Invalid D3D10 device in D2D target surface";
return nullptr;
}
HRESULT hr = Factory::GetDirect3D10Device()->CreateTexture2D(&desc, nullptr, byRef(dataSurf->mTexture));
if (FAILED(hr)) {