From 2562e48b9de05903d56a743e66f26ae34631fd23 Mon Sep 17 00:00:00 2001 From: Sathish Ambley Date: Wed, 19 Jun 2019 00:03:02 -0700 Subject: [PATCH] Check for non zero count value --- runtime/src/accounts_db.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 } }