Check that there's something selected in the tree before exporting.

Fixes: lp:1833295
* https://bugs.launchpad.net/kicad/+bug/1833295
This commit is contained in:
Jeff Young 2019-06-18 21:50:21 +01:00
parent b0c1c1ad2b
commit aaa7661b94
1 changed files with 1 additions and 1 deletions

View File

@ -239,7 +239,7 @@ int MODULE_EDITOR_TOOLS::ExportFootprint( const TOOL_EVENT& aEvent )
LIB_ID fpID = m_frame->GetTreeFPID();
MODULE* fp;
if( fpID == m_frame->GetLoadedFPID() )
if( !fpID.IsValid() )
fp = m_frame->GetBoard()->GetFirstModule();
else
fp = m_frame->LoadFootprint( fpID );