From f934ce653f24ea8f88e8e89ad6ba77f3302f3c31 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 21 Nov 2018 19:43:14 +0000 Subject: [PATCH] A bit of safety to prevent dereferencing NULL. --- eeschema/libedit/lib_edit_frame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/libedit/lib_edit_frame.cpp b/eeschema/libedit/lib_edit_frame.cpp index 9a92b8fee0..ebd410d5b5 100644 --- a/eeschema/libedit/lib_edit_frame.cpp +++ b/eeschema/libedit/lib_edit_frame.cpp @@ -1706,7 +1706,7 @@ bool LIB_EDIT_FRAME::isCurrentPart( const LIB_ID& aLibId ) const // This will return the root part of any alias LIB_PART* part = m_libMgr->GetBufferedPart( aLibId.GetLibItemName(), aLibId.GetLibNickname() ); // Now we can compare the libId of the current part and the root part - return ( GetCurPart() && part->GetLibId() == GetCurPart()->GetLibId() ); + return ( part && GetCurPart() && part->GetLibId() == GetCurPart()->GetLibId() ); }