diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index e8f3643ba..980f379bf 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -243,7 +243,9 @@ impl AccountStorageEntry { status = AccountStorageStatus::Available; } - *count_and_status = (count - 1, status); + if count > 0 { + *count_and_status = (count - 1, status); + } count_and_status.0 } }