Skip to content

Commit

Permalink
Merge pull request #14 from EOSLaoMao/hotfix/add-creditor
Browse files Browse the repository at this point in the history
fix add creditor pointer null issue
  • Loading branch information
JohnnyZhao authored Oct 21, 2018
2 parents b83f592 + 9e01bc1 commit cb5e0e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace utils
// update creditor if balance is outdated
creditor_table c(code_account, SCOPE_CREDITOR>>1);
auto creditor_itr = c.find(owner);
if(creditor_itr->balance != balance) {
if(creditor_itr != c.end() && creditor_itr->balance != balance) {
c.modify(creditor_itr, ram_payer, [&](auto &i) {
i.balance = balance;
i.updated_at = now();
Expand Down

0 comments on commit cb5e0e9

Please sign in to comment.