enumeratePads: fix segfault when no module is loaded in the editor
This commit is contained in:
parent
204eb49ce5
commit
0723ac5bef
|
@ -181,6 +181,9 @@ int MODULE_TOOLS::EnumeratePads( const TOOL_EVENT& aEvent )
|
||||||
std::set<D_PAD*> allPads;
|
std::set<D_PAD*> allPads;
|
||||||
MODULE* module = m_board->m_Modules;
|
MODULE* module = m_board->m_Modules;
|
||||||
|
|
||||||
|
if( !module || !module->Pads() )
|
||||||
|
return 0;
|
||||||
|
|
||||||
GENERAL_COLLECTOR collector;
|
GENERAL_COLLECTOR collector;
|
||||||
const KICAD_T types[] = { PCB_PAD_T, EOT };
|
const KICAD_T types[] = { PCB_PAD_T, EOT };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue