Attempt to prevent KICAD-YP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17560
This commit is contained in:
parent
5d37a00759
commit
a53bc9e026
|
@ -327,8 +327,9 @@ const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool a
|
||||||
|
|
||||||
if( !row )
|
if( !row )
|
||||||
{
|
{
|
||||||
wxString msg = wxString::Format( _( "fp-lib-table files contain no library named '%s'." ),
|
// We don't generally show this string to the user (who is unlikely to know what
|
||||||
aNickname );
|
// "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 );
|
THROW_IO_ERROR( msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -827,6 +827,12 @@ bool DRC_TEST_PROVIDER_LIBRARY_PARITY::Run()
|
||||||
wxString fpName = fpID.GetLibItemName();
|
wxString fpName = fpID.GetLibItemName();
|
||||||
const LIB_TABLE_ROW* libTableRow = nullptr;
|
const LIB_TABLE_ROW* libTableRow = nullptr;
|
||||||
|
|
||||||
|
if( libName.IsEmpty() )
|
||||||
|
{
|
||||||
|
// Not much we can do here
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
libTableRow = libTable->FindRow( libName );
|
libTableRow = libTable->FindRow( libName );
|
||||||
|
|
Loading…
Reference in New Issue