]> git.bitcoin.ninja Git - rust-lightning/commit
[bindings] Allow cloning opaque types when inner is NULL
authorMatt Corallo <git@bluematt.me>
Sat, 30 Jan 2021 22:15:22 +0000 (17:15 -0500)
committerMatt Corallo <git@bluematt.me>
Thu, 11 Feb 2021 03:25:10 +0000 (22:25 -0500)
commit03a6a243ac2752763942f414f2ac3a93b29aabc2
treed2b978e1118e3dca9ea20d26eecc23911e452607
parentac70f278cb02066d426d02346577675ea821e2bf
[bindings] Allow cloning opaque types when inner is NULL

Previously we'd segfault trying to deref the NULL page, but there
is no reason to not simply clone by creating another opaque instance
with a null inner. This comes up specifically when cloning
ChannelSigners as the pubkeys instance is NULL on construction
before get_pubkeys is called.
c-bindings-gen/src/main.rs