Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
38553be4
Commit
38553be4
authored
Nov 15, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: fix a possible crash after a board cleanup
parent
4b9b2f4e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
77 deletions
+83
-77
clean.cpp
pcbnew/clean.cpp
+73
-57
connect.cpp
pcbnew/connect.cpp
+10
-20
No files found.
pcbnew/clean.cpp
View file @
38553be4
This diff is collapsed.
Click to expand it.
pcbnew/connect.cpp
View file @
38553be4
...
...
@@ -627,35 +627,25 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
// Build the net info list
GetBoard
()
->
m_NetInfo
->
BuildListOfNets
();
if
(
m_Pcb
->
GetPadsCount
()
==
0
)
// If no pad, reset pointers and netcode, and do nothing else
{
curr_track
=
m_Pcb
->
m_Track
;
for
(
;
curr_track
!=
NULL
;
curr_track
=
curr_track
->
Next
()
)
{
curr_track
->
start
=
NULL
;
curr_track
->
SetState
(
BEGIN_ONPAD
|
END_ONPAD
,
OFF
);
curr_track
->
SetNet
(
0
);
curr_track
->
end
=
NULL
;
}
return
;
}
// Prepare connections calculations between tracks and pads */
m_Pcb
->
GetSortedPadListByXthenYCoord
(
sortedPads
);
// Reset variables and flags used in computation
curr_track
=
m_Pcb
->
m_Track
;
for
(
;
curr_track
!=
NULL
;
curr_track
=
curr_track
->
Next
()
)
{
curr_track
->
m_TracksConnected
.
clear
();
curr_track
->
start
=
NULL
;
curr_track
->
end
=
NULL
;
curr_track
->
SetState
(
BUSY
|
IN_EDIT
|
BEGIN_ONPAD
|
END_ONPAD
,
OFF
);
curr_track
->
SetZoneSubNet
(
0
);
curr_track
->
SetNet
(
0
);
// net code = 0 means not connected
curr_track
->
SetNet
(
0
);
// net code = 0 means not connected
}
// If no pad, reset pointers and netcode, and do nothing else
if
(
m_Pcb
->
GetPadsCount
()
==
0
)
return
;
// Prepare connections calculations between tracks and pads */
m_Pcb
->
GetSortedPadListByXthenYCoord
(
sortedPads
);
/* First pass: search connection between a track segment and a pad.
* if found, set the track net code to the pad netcode
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment