From c4d1cebbdd24466cf0713bff8ea6e3e86af44861 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 12 Dec 2019 14:36:29 -0500 Subject: [PATCH] Symbol editor: fix a compiler warning in the library manager code. Fixes kicad/code/kicad#3651 --- eeschema/libedit/lib_manager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/libedit/lib_manager.cpp b/eeschema/libedit/lib_manager.cpp index 5836ec9732..9eb45142fb 100644 --- a/eeschema/libedit/lib_manager.cpp +++ b/eeschema/libedit/lib_manager.cpp @@ -876,8 +876,9 @@ bool LIB_MANAGER::LIB_BUFFER::DeleteBuffer( LIB_MANAGER::PART_BUFFER::PTR aPartB bool retv = true; // Remove all derived symbols to prevent broken inheritance. - if( aPartBuf->GetPart()->IsRoot() ) - retv &= removeChildSymbols( aPartBuf ); + if( aPartBuf->GetPart()->IsRoot() && HasDerivedSymbols( aPartBuf->GetPart()->GetName() ) + && removeChildSymbols( aPartBuf ) == 0 ) + retv = false; m_deleted.emplace_back( *partBufIt ); m_parts.erase( partBufIt );