Fix a bug in DRAWSEGMENT::GetParentModule() that expected a non null parent to return a null parent!
This commit is contained in:
parent
4a6777e0d1
commit
19ad350c1c
|
@ -192,7 +192,7 @@ void DRAWSEGMENT::SetAngle( double aAngle )
|
|||
|
||||
MODULE* DRAWSEGMENT::GetParentModule() const
|
||||
{
|
||||
if( m_Parent->Type() != PCB_MODULE_T )
|
||||
if( !m_Parent || m_Parent->Type() != PCB_MODULE_T )
|
||||
return NULL;
|
||||
|
||||
return (MODULE*) m_Parent;
|
||||
|
|
Loading…
Reference in New Issue