diff --git a/src/res_tracker.cc b/src/res_tracker.cc index 0da43202cd..d9c877bab0 100644 --- a/src/res_tracker.cc +++ b/src/res_tracker.cc @@ -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(); }