Bug 1083624 - Fix assertion failure in Factory::GetDirect3D10Device(). r=bas.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 16 Oct 2014 19:02:51 -0700
changeset 210816 cbf06fe7f47a049662b813109522b64198da7362
parent 210815 35da3c99e658095b737623ab8e543fb740f872a4
child 210817 83544b7dad714d493bb3a044a50a170e055185e0
push id50558
push usernnethercote@mozilla.com
push dateFri, 17 Oct 2014 02:22:04 +0000
treeherdermozilla-inbound@83544b7dad71 [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)
 {