Fix segfault when routing.

Fixes: lp:1792037
* https://bugs.launchpad.net/kicad/+bug/1792037
This commit is contained in:
Jeff Young 2018-09-12 15:59:01 +01:00
parent 58916a200e
commit 46426f1196
1 changed files with 5 additions and 2 deletions

View File

@ -130,8 +130,11 @@ const BOX2I ROUTER_PREVIEW_ITEM::ViewBBox() const
switch( m_type ) switch( m_type )
{ {
case PR_SHAPE: case PR_SHAPE:
if( m_shape )
{
bbox = m_shape->BBox(); bbox = m_shape->BBox();
bbox.Inflate( m_width / 2 ); bbox.Inflate( m_width / 2 );
}
return bbox; return bbox;
case PR_POINT: case PR_POINT: