From 19ad350c1c1894f3a22331ee4d2482508945eda1 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 8 Sep 2017 20:18:52 +0200 Subject: [PATCH] Fix a bug in DRAWSEGMENT::GetParentModule() that expected a non null parent to return a null parent! --- pcbnew/class_drawsegment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;