diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index e3e2588859..38bef2b070 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -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;