X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FUpdateFee.java;h=9fd24408dbfa2100535dd7519b456d9e5b9880a0;hb=2ed9081562d00a8645604b07629e963231d49e0f;hp=43623fb0f67c1f5ad5c11915256740cbbe4c84c6;hpb=166ff04616cfee975ce991607ca0df88857193df;p=ldk-java diff --git a/src/main/java/org/ldk/structs/UpdateFee.java b/src/main/java/org/ldk/structs/UpdateFee.java index 43623fb0..9fd24408 100644 --- a/src/main/java/org/ldk/structs/UpdateFee.java +++ b/src/main/java/org/ldk/structs/UpdateFee.java @@ -11,29 +11,29 @@ public class UpdateFee extends CommonBase { } public UpdateFee(UpdateFee orig) { - super(bindings.UpdateFee_clone(orig.ptr & ~1)); + super(bindings.UpdateFee_clone(orig == null ? 0 : orig.ptr & ~1)); this.ptrs_to.add(orig); } public byte[] get_channel_id(UpdateFee this_ptr) { - byte[] ret = bindings.UpdateFee_get_channel_id(this_ptr.ptr & ~1); + byte[] ret = bindings.UpdateFee_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_channel_id(UpdateFee this_ptr, byte[] val) { - bindings.UpdateFee_set_channel_id(this_ptr.ptr & ~1, val); + bindings.UpdateFee_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public int get_feerate_per_kw(UpdateFee this_ptr) { - int ret = bindings.UpdateFee_get_feerate_per_kw(this_ptr.ptr & ~1); + int ret = bindings.UpdateFee_get_feerate_per_kw(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_feerate_per_kw(UpdateFee this_ptr, int val) { - bindings.UpdateFee_set_feerate_per_kw(this_ptr.ptr & ~1, val); + bindings.UpdateFee_set_feerate_per_kw(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); }