From f304d18d40d805b5c1747b684256be6ea7972d88 Mon Sep 17 00:00:00 2001 From: Adam Bialogonski Date: Thu, 23 Nov 2023 14:25:15 +0000 Subject: [PATCH] fixed coverity issue Change-Id: I14e7ced7fa0c1581454cafb46c404f191f163bd4 --- dali-scene3d/internal/model-components/model-node-impl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dali-scene3d/internal/model-components/model-node-impl.cpp b/dali-scene3d/internal/model-components/model-node-impl.cpp index d566163..6b2c8a2 100644 --- a/dali-scene3d/internal/model-components/model-node-impl.cpp +++ b/dali-scene3d/internal/model-components/model-node-impl.cpp @@ -432,11 +432,15 @@ void ModelNode::SetColliderMesh(ColliderMeshUniquePtr&& colliderMesh) auto handle = Scene3D::ModelNode::DownCast(Self()); if(mParentModel) { - if(mColliderMesh || colliderMesh == nullptr) + if(mColliderMesh) { mParentModel->RemoveColliderMesh(handle); } - mParentModel->RegisterColliderMesh(handle, *colliderMesh); + + if(colliderMesh) + { + mParentModel->RegisterColliderMesh(handle, *colliderMesh); + } } mColliderMesh = std::move(colliderMesh); -- 2.7.4