Make sure a collector has a guide before handing it to a client filter.

Fixes https://gitlab.com/kicad/code/kicad/issues/12460
This commit is contained in:
Jeff Young 2022-09-18 18:14:08 +01:00
parent 7b29b4ef55
commit 1566bd8b14
1 changed files with 3 additions and 0 deletions

View File

@ -549,8 +549,11 @@ PCB_SELECTION& PCB_SELECTION_TOOL::RequestSelection( CLIENT_SELECTION_FILTER aCl
enum DISPOSITION { BEFORE = 1, AFTER, BOTH };
std::map<EDA_ITEM*, DISPOSITION> itemDispositions;
GENERAL_COLLECTORS_GUIDE guide = getCollectorsGuide();
GENERAL_COLLECTOR collector;
collector.SetGuide( &guide );
for( EDA_ITEM* item : m_selection )
{
collector.Append( item );