From 9544978d0dae64deedcbf1a547b494d786cd3265 Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Fri, 3 May 2024 09:35:06 +0200 Subject: [PATCH] [Contact] Fix crash if collision models are not provided (#4710) --- .../component/collision/response/contact/ContactListener.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/ContactListener.h b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/ContactListener.h index 1d74785b377..1de107cd53a 100644 --- a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/ContactListener.h +++ b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/ContactListener.h @@ -118,8 +118,8 @@ class SOFA_COMPONENT_COLLISION_RESPONSE_CONTACT_API ContactListener : public vir if(arg) { - collModelPath1 = arg->getAttribute(std::string("collisionModel1"), nullptr ); - collModelPath2 = arg->getAttribute(std::string("collisionModel2"), nullptr ); + collModelPath1 = arg->getAttribute(std::string("collisionModel1"), "" ); + collModelPath2 = arg->getAttribute(std::string("collisionModel2"), "" ); // now 3 cases if ( strcmp( collModelPath1.c_str(),"" ) != 0 )