← Back to team overview

kicad-developers team mailing list archive

Crash loading boards on wx2.9

 

The Assert accesses to a non-existant item making a crash.

Index: pcbnew/class_board.cpp
===================================================================
--- pcbnew/class_board.cpp	(revision 1880)
+++ pcbnew/class_board.cpp	(working copy)
@@ -827,7 +827,9 @@
// zero is reserved for "no connection" and is not used.
if( anetcode > 0 )
{
- wxASSERT( anetcode == m_NetInfo->GetNetItem( anetcode )->GetNet() );
+ if( anetcode < (m_NetInfo->GetNetsCount() - 1) )
+ wxASSERT( anetcode == m_NetInfo->GetNetItem( anetcode )->GetNet() );
+
return m_NetInfo->GetNetItem( anetcode );
}
return NULL;








Follow ups