From 941a749caf0e75c9d050c9e4ec9f6f9c8060c69c Mon Sep 17 00:00:00 2001 From: Katie Mummah Date: Thu, 6 Jun 2024 12:02:01 -0500 Subject: [PATCH] don't update parents for resource of size zero --- src/res_tracker.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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(); }