From f9abb112afed0ac1fce994c4c5184eed6d7ba71c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 26 Jul 2017 11:54:15 +0200 Subject: [PATCH] Fix possible crash after reading a netlist Fixes: lp:1705912 https://bugs.launchpad.net/kicad/+bug/1705912 --- pcbnew/class_board.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 5e609b3a9f..183c322670 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -6,7 +6,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2011 Wayne Stambaugh * @@ -2772,9 +2772,9 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, } } - wxASSERT( pad ); + wxASSERT( pad ); // pad = 0 means the pad list is not up to date - if( zoneCount == 0 ) + if( pad && zoneCount == 0 ) { if( aReporter ) {