From 64ebe27477d7e1fa2d4869ab91678d7413937135 Mon Sep 17 00:00:00 2001 From: Chuyuan Fu Date: Thu, 16 May 2019 18:13:29 -0700 Subject: [PATCH] Add safety check --- src/BulletCollision/BroadphaseCollision/btDbvt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BulletCollision/BroadphaseCollision/btDbvt.cpp b/src/BulletCollision/BroadphaseCollision/btDbvt.cpp index 5ab3f9b60..166cb04c0 100644 --- a/src/BulletCollision/BroadphaseCollision/btDbvt.cpp +++ b/src/BulletCollision/BroadphaseCollision/btDbvt.cpp @@ -80,6 +80,7 @@ static DBVT_INLINE void deletenode(btDbvt* pdbvt, static void recursedeletenode(btDbvt* pdbvt, btDbvtNode* node) { + if (node == 0) return; if (!node->isleaf()) { recursedeletenode(pdbvt, node->childs[0]);