X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FRoutingFees.java;h=1c0768518a00f41b5e92f50602559dec3cf7ba9e;hb=890e35a4387758c0447aab34166caa579bbf3a08;hp=2055ec2a91877cff52a912976fbe59bfe767658c;hpb=2a8741cb87eb2b82381a6220a98f80f741147837;p=ldk-java diff --git a/src/main/java/org/ldk/structs/RoutingFees.java b/src/main/java/org/ldk/structs/RoutingFees.java index 2055ec2a..1c076851 100644 --- a/src/main/java/org/ldk/structs/RoutingFees.java +++ b/src/main/java/org/ldk/structs/RoutingFees.java @@ -67,7 +67,7 @@ public class RoutingFees extends CommonBase { Reference.reachabilityFence(proportional_millionths_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.RoutingFees ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RoutingFees(null, ret); } - ret_hu_conv.ptrs_to.add(ret_hu_conv); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; return ret_hu_conv; } @@ -77,10 +77,10 @@ public class RoutingFees extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(RoutingFees b) { - boolean ret = bindings.RoutingFees_eq(this.ptr, b == null ? 0 : b.ptr & ~1); + boolean ret = bindings.RoutingFees_eq(this.ptr, b == null ? 0 : b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); - this.ptrs_to.add(b); + if (this != null) { this.ptrs_to.add(b); }; return ret; } @@ -102,7 +102,7 @@ public class RoutingFees extends CommonBase { Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.RoutingFees ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RoutingFees(null, ret); } - ret_hu_conv.ptrs_to.add(this); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; }