Symbol Fields Table: don't deref non-existant ref

This commit is contained in:
Mike Williams 2023-08-08 08:17:43 -04:00
parent 8bb895373a
commit 111d73067d
1 changed files with 5 additions and 3 deletions

View File

@ -1015,13 +1015,15 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnTableRangeSelected( wxGridRangeSelectEvent& a
{
SCH_EDITOR_CONTROL* editor = m_parent->GetToolManager()->GetTool<SCH_EDITOR_CONTROL>();
// Use of full path based on UUID allows select of not yet annotated or duplicaded symbols
wxString symbol_path = refs.begin()->GetFullPath();
if( refs.size() > 0 )
{
// Use of full path based on UUID allows select of not yet annotated or duplicaded symbols
wxString symbol_path = refs.begin()->GetFullPath();
// Focus only handles on item at this time
editor->FindSymbolAndItem( &symbol_path, nullptr, true, HIGHLIGHT_SYMBOL,
wxEmptyString );
}
else
m_parent->FocusOnItem( nullptr );