From bce4a45ab4dca169602d1566edf161d93534f3e9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 27 Dec 2018 13:45:41 +0100 Subject: [PATCH] Fixed a crash when trying to highlight a not existing component --- eeschema/find.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/eeschema/find.cpp b/eeschema/find.cpp index 9ee31e4871..b7eb260a31 100644 --- a/eeschema/find.cpp +++ b/eeschema/find.cpp @@ -235,9 +235,12 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference, SetStatusText( msg ); - // highlight selection - GetCanvas()->GetView()->HighlightItem( foundItem, pin ); - GetCanvas()->Refresh(); + if( foundItem ) + { + // highlight selection + GetCanvas()->GetView()->HighlightItem( foundItem, pin ); + GetCanvas()->Refresh(); + } return item; }