Footprint Viewer: do not try to preselect an empty footprint
Empty string is treated as an invalid LIB_ID, so it ends up with an exception.
This commit is contained in:
parent
351fc0c343
commit
62fd734007
|
@ -624,9 +624,10 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event )
|
|||
|
||||
bool FOOTPRINT_VIEWER_FRAME::ShowModal( wxString* aFootprint, wxWindow* aResultantFocusWindow )
|
||||
{
|
||||
if( aFootprint )
|
||||
if( aFootprint && !aFootprint->IsEmpty() )
|
||||
{
|
||||
LIB_ID fpid( *aFootprint );
|
||||
|
||||
if( fpid.IsValid() )
|
||||
{
|
||||
setCurNickname( fpid.GetLibNickname() );
|
||||
|
|
Loading…
Reference in New Issue