Browse Source

Fixed bug with releasing PhysxController (get_actor got called after unlink).

enn0x 15 years ago
parent
commit
39ffe108c3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      panda/src/physx/physxController.cxx

+ 2 - 1
panda/src/physx/physxController.cxx

@@ -34,8 +34,9 @@ release() {
 
 
   nassertv(_error_type == ET_ok);
   nassertv(_error_type == ET_ok);
 
 
+  NxControllerManager *cm = get_actor()->get_scene()->cm();
   unlink();
   unlink();
-  get_actor()->get_scene()->cm()->releaseController(*ptr());
+  cm->releaseController(*ptr());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////