Fixes bug #1332438: PNS router crashes when you another track while routing in "shove" mode
This commit is contained in:
parent
4cd4990bc2
commit
b4e0a5cbbf
|
@ -112,7 +112,7 @@ public:
|
|||
LINKED_ITEMS::iterator f = std::find( m_linkedItems.begin(), m_linkedItems.end(), aItem );
|
||||
|
||||
if( f != m_linkedItems.end() )
|
||||
m_linkedItems.erase( f );
|
||||
f = m_linkedItems.erase( f );
|
||||
|
||||
return m_linkedItems.size() == 0;
|
||||
}
|
||||
|
|
|
@ -1216,14 +1216,21 @@ int PNS_NODE::FindByMarker( int aMarker, PNS_ITEMSET& aItems )
|
|||
|
||||
int PNS_NODE::RemoveByMarker( int aMarker )
|
||||
{
|
||||
std::list<PNS_ITEM*> garbage;
|
||||
|
||||
for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i )
|
||||
{
|
||||
if ( (*i)->Marker() & aMarker )
|
||||
{
|
||||
Remove( *i );
|
||||
garbage.push_back( *i );
|
||||
}
|
||||
}
|
||||
|
||||
for( std::list<PNS_ITEM*>::const_iterator i = garbage.begin(), end = garbage.end(); i != end; ++i )
|
||||
{
|
||||
Remove( *i );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue