Commit 56ee7d64 authored by sallet's avatar sallet
Browse files

fix a memory error: remove a NULL pointer usage

parent f91cd0b3
......@@ -210,8 +210,9 @@ void Track :: Mark(int pos)
void Track :: Sweep(int pos) {
BackPoint *It = Path.Next;
BackPoint *NextIt;
while ( (It != &Path)){// && (It->StartPos >= pos)) {
NextIt = It->Next;
if (!It->IsMarked()) {
It->Next->Additional += It->Additional;
It->Next->Prev = It->Prev;
......@@ -219,8 +220,7 @@ void Track :: Sweep(int pos) {
delete It;
NumBPCollect++;
}
It = It->Next;
It = NextIt;
}
}
// ----------------------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment