kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #02953
Crash loading boards on wx2.9
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
"Marco Serantoni" <marco.serantoni@...>
-
Date:
Sun, 19 Jul 2009 23:03:45 -0000
-
User-agent:
eGroups-EW/0.82
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