Avoid Cvpcb crash from malformed fp libraries (namely converted from Eagle) when the fp names are not coded using ASCII/UTF8 code.
This commit is contained in:
parent
40ccc0bedf
commit
3e0334a972
|
@ -101,12 +101,17 @@ void FOOTPRINT_INFO::load()
|
|||
|
||||
std::auto_ptr<MODULE> m( fptable->FootprintLoad( m_nickname, m_fpname ) );
|
||||
|
||||
m_pad_count = m->GetPadCount( DO_NOT_INCLUDE_NPTH );
|
||||
m_keywords = m->GetKeywords();
|
||||
m_doc = m->GetDescription();
|
||||
if( m.get() == NULL ) // Should happen only with malformed/broken libraries
|
||||
m_pad_count = 0;
|
||||
else
|
||||
{
|
||||
m_pad_count = m->GetPadCount( DO_NOT_INCLUDE_NPTH );
|
||||
m_keywords = m->GetKeywords();
|
||||
m_doc = m->GetDescription();
|
||||
|
||||
// tell ensure_loaded() I'm loaded.
|
||||
m_loaded = true;
|
||||
// tell ensure_loaded() I'm loaded.
|
||||
m_loaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue