Eeschema, lib editor: fix a message error when loading a symbol from the schematic editor.

Adaptation from master branch, commit ff995bb7
This commit is contained in:
jean-pierre charras 2019-07-02 17:34:45 +02:00
parent 3b98b00d6f
commit d129abb9c9
1 changed files with 6 additions and 1 deletions

View File

@ -234,7 +234,12 @@ void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue( wxVariant& aVariant, wxDataVie
case 1:
if( node->LibId == m_libMgr->GetCurrentLibId() )
{
auto alias = m_libMgr->GetAlias( node->Name, node->Parent->Name );
LIB_ALIAS* alias = nullptr;
// When the node parent name is empty, the node is a lib name, not a symbol name
// However should not happen, but happens.
if( !node->Parent->Name.IsEmpty() )
alias = m_libMgr->GetAlias( node->Name, node->Parent->Name );
if( alias )
aVariant = alias->GetDescription();