Bug 1083624 - Fix assertion failure in Factory::GetDirect3D10Device(). r=bas.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 16 Oct 2014 19:02:51 -0700
changeset 210840 cbf06fe7f47a049662b813109522b64198da7362
parent 210839 35da3c99e658095b737623ab8e543fb740f872a4
child 210841 83544b7dad714d493bb3a044a50a170e055185e0
push id27661
push usercbook@mozilla.com
push dateFri, 17 Oct 2014 14:25:58 +0000
treeherdermozilla-central@4e9c5f29fc5e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs1083624
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1083624 - Fix assertion failure in Factory::GetDirect3D10Device(). r=bas.
gfx/2d/Factory.cpp
--- 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)
 {