wallet/wallet.com: bind_null if (out->preimage)

This commit is contained in:
Jan Sarenik 2018-06-15 12:56:44 +02:00 committed by Rusty Russell
parent 5205de7b8e
commit da80447ba3

View file

@ -1176,6 +1176,8 @@ void wallet_htlc_save_out(struct wallet *wallet,
if (out->preimage) if (out->preimage)
sqlite3_bind_preimage(stmt, 8,out->preimage); sqlite3_bind_preimage(stmt, 8,out->preimage);
else
sqlite3_bind_null(stmt, 8);
sqlite3_bind_int(stmt, 9, out->hstate); sqlite3_bind_int(stmt, 9, out->hstate);
sqlite3_bind_blob(stmt, 10, &out->onion_routing_packet, sqlite3_bind_blob(stmt, 10, &out->onion_routing_packet,