Skip to content

Commit 6fc73c1

Browse files
Edit fix for the assert when destroying an empty PhysicsWorld
1 parent f28bfa9 commit 6fc73c1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixed
66

7+
- Issue [#377](https://github.com/DanielChappuis/reactphysics3d/issues/377) Fix assert when destroying an empty PhysicsWorld
78
- Issue [#378](https://github.com/DanielChappuis/reactphysics3d/issues/378) Fix issue with raycasting of HeightFieldShape
89
- Fix crash within testbed application in raycasting scene
910

include/reactphysics3d/containers/Deque.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,10 @@ class Deque {
296296

297297
clear();
298298

299-
if (mBuffer != nullptr && mCapacity > 0) {
299+
if (mCapacity > 0) {
300+
301+
assert(mBuffer != nullptr);
302+
300303
// Release the chunks array
301304
mAllocator.release(mBuffer, sizeof(T) * mCapacity);
302305
}

0 commit comments

Comments
 (0)