File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -540,9 +540,11 @@ void PhysxSystemGpu::gpuQueryContactPairImpulses(PhysxGpuContactPairImpulseQuery
540540
541541 copyContactData ();
542542
543- handle_contacts ((PxGpuContactPair *)mCudaContactBuffer .ptr , mContactCount ,
543+ if (mContactCount ) {
544+ handle_contacts ((PxGpuContactPair *)mCudaContactBuffer .ptr , mContactCount ,
544545 (ActorPairQuery *)query.query .ptr , query.query .shape .at (0 ),
545546 (Vec3 *)query.buffer .ptr , mCudaStream );
547+ }
546548 cudaStreamSynchronize (mCudaStream );
547549}
548550
@@ -555,9 +557,11 @@ void PhysxSystemGpu::gpuQueryContactBodyImpulses(PhysxGpuContactBodyImpulseQuery
555557
556558 copyContactData ();
557559
558- handle_net_contact_force ((PxGpuContactPair *)mCudaContactBuffer .ptr , mContactCount ,
560+ if (mContactCount ) {
561+ handle_net_contact_force ((PxGpuContactPair *)mCudaContactBuffer .ptr , mContactCount ,
559562 (ActorQuery *)query.query .ptr , query.query .shape .at (0 ),
560563 (Vec3 *)query.buffer .ptr , mCudaStream );
564+ }
561565 cudaStreamSynchronize (mCudaStream );
562566}
563567
You can’t perform that action at this time.
0 commit comments