X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=inline;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FRoutingFees.java;h=80183bb91bfb1b7508f22d4538aa6883891ba9a5;hb=ad15b3a4dbf3fbc7f08ef22d656bae79e8182008;hp=215372fa7e71112bdef675084713fb4091c63af9;hpb=166ff04616cfee975ce991607ca0df88857193df;p=ldk-java diff --git a/src/main/java/org/ldk/structs/RoutingFees.java b/src/main/java/org/ldk/structs/RoutingFees.java index 215372fa..80183bb9 100644 --- a/src/main/java/org/ldk/structs/RoutingFees.java +++ b/src/main/java/org/ldk/structs/RoutingFees.java @@ -7,33 +7,34 @@ public class RoutingFees extends CommonBase { RoutingFees(Object _dummy, long ptr) { super(ptr); } @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { - bindings.RoutingFees_free(ptr); super.finalize(); + super.finalize(); + bindings.RoutingFees_free(ptr); } public RoutingFees(RoutingFees orig) { - super(bindings.RoutingFees_clone(orig.ptr & ~1)); + super(bindings.RoutingFees_clone(orig == null ? 0 : orig.ptr & ~1)); this.ptrs_to.add(orig); } public int get_base_msat(RoutingFees this_ptr) { - int ret = bindings.RoutingFees_get_base_msat(this_ptr.ptr & ~1); + int ret = bindings.RoutingFees_get_base_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_base_msat(RoutingFees this_ptr, int val) { - bindings.RoutingFees_set_base_msat(this_ptr.ptr & ~1, val); + bindings.RoutingFees_set_base_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public int get_proportional_millionths(RoutingFees this_ptr) { - int ret = bindings.RoutingFees_get_proportional_millionths(this_ptr.ptr & ~1); + int ret = bindings.RoutingFees_get_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_proportional_millionths(RoutingFees this_ptr, int val) { - bindings.RoutingFees_set_proportional_millionths(this_ptr.ptr & ~1, val); + bindings.RoutingFees_set_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); }