Bug 1048099 - Check that the d3d9 wasn't lost before providing access to it in CompositorD3D9. r=Bas

This commit is contained in:
Nicolas Silva 2014-08-06 14:39:58 +02:00
parent 025631c541
commit 5f3f31ae67

View File

@ -89,7 +89,10 @@ public:
IDirect3DDevice9* device() const
{
return mDeviceManager
// If the reset counts don't match it means the device was lost and we are
// in the process of recreating a new one or will be soon.
// cf. comment in EnsureSwapChain.
return mDeviceManager && mDeviceResetCount == mDeviceManager->GetDeviceResetCount()
? mDeviceManager->device()
: nullptr;
}