libedit: Check proper field grid type

Fixes segfault where pointers are not zeroed

Fixes: lp:1811519
* https://bugs.launchpad.net/kicad/+bug/1811519
This commit is contained in:
Seth Hillbrand 2019-01-12 06:49:45 -08:00
parent f5144eb5cf
commit 634d02bd04
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2019 KiCad Developers, see CHANGELOG.TXT for contributors.
* Copyright (C) 2016-2017 CERN * Copyright (C) 2016-2017 CERN
* @author Maciej Suminski <maciej.suminski@cern.ch> * @author Maciej Suminski <maciej.suminski@cern.ch>
* *
@ -264,7 +265,7 @@ bool DIALOG_SPICE_MODEL::TransferDataToWindow()
NET_ADJUST_INCLUDE_PATHS | NET_ADJUST_PASSIVE_VALS ); NET_ADJUST_INCLUDE_PATHS | NET_ADJUST_PASSIVE_VALS );
// Do not modify the existing value, just add missing fields with default values // Do not modify the existing value, just add missing fields with default values
if( m_schfields ) if( m_useSchFields && m_schfields )
{ {
for( auto field : *m_schfields ) for( auto field : *m_schfields )
{ {