Defensive programming measures.

Recent issue conversations are suggesting that it's no possible for
footprints to contain null fields.  Rather than blindly dereferencing
field pointers in loops, check to make sure the field pointer is not
null before dereferencing.
This commit is contained in:
Wayne Stambaugh
2026-01-14 10:39:14 -05:00
parent 70d9624838
commit 8bc56cd501
20 changed files with 65 additions and 0 deletions
+2
View File
@@ -433,6 +433,8 @@ void BRDITEMS_PLOTTER::PlotFootprintTextItems( const FOOTPRINT* aFootprint )
// Skip the reference and value texts that are handled specially
for( PCB_FIELD* field : aFootprint->GetFields() )
{
wxCHECK2( field, continue );
if( field->IsReference() || field->IsValue() )
continue;