Skip to content

Commit

Permalink
[Contact] Fix crash if collision models are not provided (sofa-framew…
Browse files Browse the repository at this point in the history
  • Loading branch information
alxbilger authored May 3, 2024
1 parent dd4c252 commit 9544978
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 9544978

Please sign in to comment.