kicad-developers team mailing list archive
Mailing list archive
Re: [MacOSX] Crash loading boards on wx2.9
This patch seems dubious.
wxASSERTs are in there to find problems. Disabling them simply means
the problem can exist without being detected.
why is anetcode >= (m_NetInfo->GetNetsCount() - 1)
*not* a problem. And if it is a problem, why would you not want to
know about it?
The Assert accesses to a non-existant item making a crash.
--- 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 );