Attempt to prevent KICAD-YP.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17560
This commit is contained in:
Jeff Young 2024-03-24 18:12:38 +00:00
parent 5d37a00759
commit a53bc9e026
2 changed files with 9 additions and 2 deletions

View File

@ -327,8 +327,9 @@ const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool a
if( !row )
{
wxString msg = wxString::Format( _( "fp-lib-table files contain no library named '%s'." ),
aNickname );
// We don't generally show this string to the user (who is unlikely to know what
// "fp-lib-table" means), and translating it may produce Sentry KICAD-YP.
wxString msg = wxString::Format( wxS( "'%s' not found in fp-lib-table." ), aNickname );
THROW_IO_ERROR( msg );
}

View File

@ -827,6 +827,12 @@ bool DRC_TEST_PROVIDER_LIBRARY_PARITY::Run()
wxString fpName = fpID.GetLibItemName();
const LIB_TABLE_ROW* libTableRow = nullptr;
if( libName.IsEmpty() )
{
// Not much we can do here
continue;
}
try
{
libTableRow = libTable->FindRow( libName );