Don't assume net navigator has root item (KICAD-7Q7).

This commit is contained in:
Jeff Young
2025-06-24 11:52:29 -06:00
parent a7fdea9b6f
commit b58f5607cc
+5 -1
View File
@@ -467,9 +467,13 @@ void SCH_EDIT_FRAME::SelectNetNavigatorItem( const NET_NAVIGATOR_ITEM_DATA* aSel
if( !aSelection )
return;
wxTreeItemId rootId = m_netNavigator->GetRootItem();
if( !rootId.IsOk() )
return;
wxTreeItemIdValue sheetCookie;
NET_NAVIGATOR_ITEM_DATA* itemData = nullptr;
wxTreeItemId rootId = m_netNavigator->GetRootItem();
wxTreeItemId sheetId = m_netNavigator->GetFirstChild( rootId, sheetCookie );
while( sheetId.IsOk() )