From 0640ac23cb3a4bf3357834241c3dcc15112c6ffe Mon Sep 17 00:00:00 2001 From: Jan Sarenik Date: Thu, 14 Jun 2018 15:19:02 +0200 Subject: [PATCH] wallet/wallet.c: Add missing bind_null In order to address #338 --- wallet/wallet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wallet/wallet.c b/wallet/wallet.c index 300a84b99..b11131549 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -1162,6 +1162,8 @@ void wallet_htlc_save_out(struct wallet *wallet, sqlite3_bind_int(stmt, 3, DIRECTION_OUTGOING); if (out->in) sqlite3_bind_int64(stmt, 4, out->in->dbid); + else + sqlite3_bind_null(stmt, 4); sqlite3_bind_int64(stmt, 5, out->msatoshi); sqlite3_bind_int(stmt, 6, out->cltv_expiry); sqlite3_bind_sha256(stmt, 7, &out->payment_hash);