Fix doubly-inited list.

Fixes https://gitlab.com/kicad/code/kicad/issues/4921
This commit is contained in:
Jeff Young 2020-08-08 15:14:41 +01:00
parent 7cd8f710b6
commit 98237e96a4
2 changed files with 4 additions and 2 deletions

View File

@ -447,7 +447,7 @@ bool NET_SETTINGS::ParseBusGroup( wxString aGroup, wxString* aName,
void NET_SETTINGS::ResolveNetClassAssignments( bool aRebuildFromScratch )
{
std::map<wxString, wxString> baseList = m_NetClassAssignments;
std::map<wxString, wxString> baseList;
if( aRebuildFromScratch )
{

View File

@ -231,11 +231,13 @@ public:
/**
* Function Clear
* destroys any contained NETCLASS instances except the Default one.
* destroys any contained NETCLASS instances except the Default one, and clears any
* members from the Default one.
*/
void Clear()
{
m_NetClasses.clear();
m_default->Clear();
}
typedef NETCLASS_MAP::iterator iterator;