schematic: fix crash in search pane when hit list is empty
std::all_of also returns true for an empty set
This commit is contained in:
parent
2612b49698
commit
7f250870fe
|
@ -93,7 +93,7 @@ void SCH_SEARCH_HANDLER::SelectItems( std::vector<long>& aItemRows )
|
|||
|
||||
m_frame->GetToolManager()->RunAction( EE_ACTIONS::clearSelection, true );
|
||||
|
||||
if( allHitsOnSamePage )
|
||||
if( allHitsOnSamePage && !selectedHits.empty() )
|
||||
{
|
||||
m_frame->SetCurrentSheet( *selectedHits.front().sheetPath );
|
||||
m_frame->DisplayCurrentSheet();
|
||||
|
|
Loading…
Reference in New Issue