Bug 1245747 - Handle ANGLE device reset failure. r=jgilbert, a=ritu
authorEdwin Flores <edwin@mozilla.com>
Wed, 28 Sep 2016 06:24:00 -0400
changeset 350455 b01845a420492639e729093b5e1a5599bc17b967
parent 350454 fc6761698bd24f2f3fa992aa19efb5477a7fd900
child 350456 554bbde4e46239eea48d5a27b65b69b20b4d2b7e
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert, ritu
bugs1245747
milestone50.0
Bug 1245747 - Handle ANGLE device reset failure. r=jgilbert, a=ritu
gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
--- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
+++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
@@ -2549,16 +2549,20 @@ void Renderer11::releaseDeviceResources(
     SafeRelease(mSyncQuery);
 }
 
 // set notify to true to broadcast a message to all contexts of the device loss
 bool Renderer11::testDeviceLost()
 {
     bool isLost = false;
 
+    if (!mDevice) {
+        return true;
+    }
+
     // GetRemovedReason is used to test if the device is removed
     HRESULT result = mDevice->GetDeviceRemovedReason();
     isLost = d3d11::isDeviceLostError(result);
 
     if (isLost)
     {
         ERR("The D3D11 device was removed: 0x%08X", result);
     }