Browse Source

fix shutdown error

David Rose 17 years ago
parent
commit
e17321413b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx

+ 4 - 0
panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx

@@ -173,6 +173,10 @@ DXGraphicsStateGuardian9::
   if (IS_VALID_PTR(_d3d_device)) {
   if (IS_VALID_PTR(_d3d_device)) {
     _d3d_device->SetTexture(0, NULL);  // this frees reference to the old texture
     _d3d_device->SetTexture(0, NULL);  // this frees reference to the old texture
   }
   }
+#ifdef HAVE_CG
+  cgD3D9SetDevice(NULL);
+#endif // HAVE_CG
+
   free_nondx_resources();
   free_nondx_resources();
 }
 }