mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
Eeschema, fields_grid_table.cpp: fix a crash when the eeschema settings are not available.
It happens if the svhematic is not open when opening the symbol editor. Fix also a compil warning. Fixes #6384 https://gitlab.com/kicad/code/kicad/issues/6384
This commit is contained in:
parent
8a4992b528
commit
9aa6e40b79
@ -309,7 +309,9 @@ wxGridCellAttr* FIELDS_GRID_TABLE<T>::GetAttr( int aRow, int aCol, wxGridCellAtt
|
|||||||
wxString fn = GetValue( aRow, FDC_NAME );
|
wxString fn = GetValue( aRow, FDC_NAME );
|
||||||
|
|
||||||
SCHEMATIC_SETTINGS* settings = m_frame->Prj().GetProjectFile().m_SchematicSettings;
|
SCHEMATIC_SETTINGS* settings = m_frame->Prj().GetProjectFile().m_SchematicSettings;
|
||||||
const TEMPLATE_FIELDNAME* templateFn = settings->m_TemplateFieldNames.GetFieldName( fn );
|
|
||||||
|
const TEMPLATE_FIELDNAME* templateFn =
|
||||||
|
settings ? settings->m_TemplateFieldNames.GetFieldName( fn ) : nullptr;
|
||||||
|
|
||||||
if( templateFn && templateFn->m_URL )
|
if( templateFn && templateFn->m_URL )
|
||||||
{
|
{
|
||||||
|
@ -106,6 +106,9 @@ public:
|
|||||||
case S_ARC:
|
case S_ARC:
|
||||||
case S_CURVE:
|
case S_CURVE:
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
case S_LAST: // Sentinel
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false; // Make compil happy
|
return false; // Make compil happy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user