diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-04-05 02:20:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-05 02:20:40 +0200 |
commit | 3ffe7004ddb56697dbf661786b996dafa98bc89e (patch) | |
tree | 20684087767aed25aecf144ca5616d1b82dffdc7 | |
parent | af2c8fbcb621364fad45d634b10727b010e0c3b4 (diff) | |
parent | 099b024a2b31e8be856450bac7e16c1fb9a9cf78 (diff) |
Merge pull request #59896 from akien-mga/dynamicbvh-crash
-rw-r--r-- | core/math/dynamic_bvh.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/math/dynamic_bvh.h b/core/math/dynamic_bvh.h index 74831089f3..50ec2c2b30 100644 --- a/core/math/dynamic_bvh.h +++ b/core/math/dynamic_bvh.h @@ -183,7 +183,7 @@ private: Node *parent = nullptr; union { Node *childs[2]; - void *data = nullptr; + void *data; }; _FORCE_INLINE_ bool is_leaf() const { return childs[1] == nullptr; } @@ -215,7 +215,10 @@ private: return axis.dot(volume.get_center() - org) <= 0; } - Node() {} + Node() { + childs[0] = nullptr; + childs[1] = nullptr; + } }; PagedAllocator<Node> node_allocator; |