Fix crash: pcbnew segfault when show local ratsnest for module is ON if clicking on an empty area.

Fixes: lp:1702021
https://bugs.launchpad.net/kicad/+bug/1702021
This commit is contained in:
jean-pierre charras 2017-07-03 11:06:44 +02:00
parent 43084daa40
commit 65fea1b92b
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ void MODULE::DrawOutlinesWhenMoving( EDA_DRAW_PANEL* panel, wxDC* DC,
void PCB_EDIT_FRAME::Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC )
{
if( item->Type() == PCB_MODULE_T )
if( item && item->Type() == PCB_MODULE_T )
{
auto mod = static_cast<MODULE*> (item);