Fix properties crash when selecting libedit arc and non-EDA_SHAPE.

This commit is contained in:
Alex Shvartzkop 2023-09-05 12:49:07 +03:00
parent a5a93f808e
commit a84c01b1ed
1 changed files with 4 additions and 1 deletions

View File

@ -1769,7 +1769,10 @@ static struct EDA_SHAPE_DESC
angle->SetAvailableFunc( angle->SetAvailableFunc(
[=]( INSPECTABLE* aItem ) -> bool [=]( INSPECTABLE* aItem ) -> bool
{ {
return aItem->Get<SHAPE_T>( shape ) == SHAPE_T::ARC; if( EDA_SHAPE* shape = dynamic_cast<EDA_SHAPE*>( aItem ) )
return shape->GetShape() == SHAPE_T::ARC;
return false;
} ); } );
propMgr.AddProperty( angle ); propMgr.AddProperty( angle );