diff --git a/eeschema/lib_symbol.cpp b/eeschema/lib_symbol.cpp index d9ad097948..9dfa858af9 100644 --- a/eeschema/lib_symbol.cpp +++ b/eeschema/lib_symbol.cpp @@ -703,7 +703,9 @@ const wxString LIB_SYMBOL::GetLibraryName() const bool LIB_SYMBOL::IsPower() const { - if( LIB_SYMBOL_SPTR parent = m_parent.lock() ) + std::shared_ptr parent; + + if( !m_parent.expired() && ( parent = m_parent.lock() ) ) { if( parent->IsRoot() ) return parent->m_options == ENTRY_POWER;