do not NPE if encountering reserve_close for which we have no summary

This commit is contained in:
Christian Grothoff 2020-02-25 14:12:28 +01:00
parent 227467c394
commit 548a0cc09d
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -1083,6 +1083,8 @@ handle_reserve_in (void *cls,
TALER_amount_add (&rs->total_in,
&rs->total_in,
credit));
if (NULL == rs->sender_account)
rs->sender_account = GNUNET_strdup (sender_account_details);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Additional incoming wire transfer for reserve `%s' of %s\n",
@ -1590,7 +1592,14 @@ handle_reserve_closed (void *cls,
1);
}
}
if (0 != strcmp (rs->sender_account,
if (NULL == rs->sender_account)
{
GNUNET_break (GNUNET_NO == rs->had_ri);
report_row_inconsistency ("reserves_close",
rowid,
"target account not verified, auditor does not know reserve");
}
else if (0 != strcmp (rs->sender_account,
receiver_account))
{
report_row_inconsistency ("reserves_close",