From 75bb32cc855678f4da5aaf00d94de7bcf776773d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 16 Oct 2014 19:02:51 -0700 Subject: [PATCH] Bug 1083624 - Fix assertion failure in Factory::GetDirect3D10Device(). r=bas. --HG-- extra : rebase_source : e28b1575b8bd4706d7d203696a1280c76e103ef6 --- gfx/2d/Factory.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gfx/2d/Factory.cpp b/gfx/2d/Factory.cpp index f18245c85d1e..820484112f2b 100644 --- a/gfx/2d/Factory.cpp +++ b/gfx/2d/Factory.cpp @@ -548,11 +548,12 @@ Factory::SetDirect3D10Device(ID3D10Device1 *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; }