Bug 1083624 - Fix assertion failure in Factory::GetDirect3D10Device(). r=bas.
--- a/gfx/2d/Factory.cpp
+++ b/gfx/2d/Factory.cpp
@@ -543,21 +543,22 @@ Factory::SetDirect3D10Device(ID3D10Devic
// On Windows 8 error codes are the default, but on Windows 7 the
// default is to throw (or perhaps only with some drivers?)
aDevice->SetExceptionMode(0);
mD3D10Device = aDevice;
}
ID3D10Device1*
Factory::GetDirect3D10Device()
-
{
#ifdef DEBUG
- UINT mode = mD3D10Device->GetExceptionMode();
- MOZ_ASSERT(0 == mode);
+ if (mD3D10Device) {
+ UINT mode = mD3D10Device->GetExceptionMode();
+ MOZ_ASSERT(0 == mode);
+ }
#endif
return mD3D10Device;
}
#ifdef USE_D2D1_1
TemporaryRef<DrawTarget>
Factory::CreateDrawTargetForD3D11Texture(ID3D11Texture2D *aTexture, SurfaceFormat aFormat)
{