X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FTwoTuple_OutPointScriptZ.java;h=c0f48c10b3114cd74615bf8af0dc128401d5758c;hb=f385eff0dd0aa61fbf21ae946c424f4a6a26de04;hp=1f65d4f209acb064928677341b3b160a10aba1fa;hpb=2a8741cb87eb2b82381a6220a98f80f741147837;p=ldk-java diff --git a/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java b/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java index 1f65d4f2..c0f48c10 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java @@ -28,7 +28,7 @@ public class TwoTuple_OutPointScriptZ extends CommonBase { Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(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; } @@ -56,7 +56,7 @@ public class TwoTuple_OutPointScriptZ extends CommonBase { Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(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; } @@ -64,12 +64,13 @@ public class TwoTuple_OutPointScriptZ extends CommonBase { * Creates a new C2Tuple_OutPointScriptZ from the contained elements. */ public static TwoTuple_OutPointScriptZ of(OutPoint a, byte[] b) { - long ret = bindings.C2Tuple_OutPointScriptZ_new(a == null ? 0 : a.ptr & ~1, b); + long ret = bindings.C2Tuple_OutPointScriptZ_new(a == null ? 0 : a.ptr, b); Reference.reachabilityFence(a); Reference.reachabilityFence(b); if (ret >= 0 && ret <= 4096) { return null; } TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(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); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); }; return ret_hu_conv; }