From d129abb9c9ae69f8f7e4fff2cf760f37fd55845b Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 2 Jul 2019 17:34:45 +0200 Subject: [PATCH] Eeschema, lib editor: fix a message error when loading a symbol from the schematic editor. Adaptation from master branch, commit ff995bb7 --- eeschema/symbol_tree_synchronizing_adapter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eeschema/symbol_tree_synchronizing_adapter.cpp b/eeschema/symbol_tree_synchronizing_adapter.cpp index 9675c87c05..cef3742b48 100644 --- a/eeschema/symbol_tree_synchronizing_adapter.cpp +++ b/eeschema/symbol_tree_synchronizing_adapter.cpp @@ -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();