Fix a bug in DRAWSEGMENT::GetParentModule() that expected a non null parent to return a null parent!

This commit is contained in:
jean-pierre charras 2017-09-08 20:18:52 +02:00
parent 4a6777e0d1
commit 19ad350c1c
1 changed files with 1 additions and 1 deletions

View File

@ -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;