Skip to content

Commit

Permalink
don't update parents for resource of size zero
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearkatie committed Jun 6, 2024
1 parent 62da382 commit 941a749
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/res_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@ void ResTracker::Extract(ResTracker* removed) {
return;
}

parent1_ = res_->state_id();
parent2_ = 0;
if (res_->quantity() > eps_rsrc()) {
parent1_ = res_->state_id();
parent2_ = 0;

Record();
}

removed->parent1_ = res_->state_id();
removed->parent2_ = 0;
removed->tracked_ = tracked_;

if (res_->quantity() > eps_rsrc()) {
Record();
}
removed->Record();
}

Expand Down

0 comments on commit 941a749

Please sign in to comment.