X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FOption_CVec_NetAddressZZ.java;h=2213c4617ca295f2f7b9b0a9ff4e331d2ff312ad;hb=300b54d26fe5ed89f472ef821ebf67d56c917e49;hp=15a5fe325ab876f4164a09202828e866147cf4b9;hpb=1854b5cebef22ace9e9e4dd191f609818df9ce08;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Option_CVec_NetAddressZZ.java b/src/main/java/org/ldk/structs/Option_CVec_NetAddressZZ.java index 15a5fe32..2213c461 100644 --- a/src/main/java/org/ldk/structs/Option_CVec_NetAddressZZ.java +++ b/src/main/java/org/ldk/structs/Option_CVec_NetAddressZZ.java @@ -38,11 +38,12 @@ public class Option_CVec_NetAddressZZ extends CommonBase { private Some(long ptr, bindings.LDKCOption_CVec_NetAddressZZ.Some obj) { super(null, ptr); long[] some = obj.some; - NetAddress[] some_conv_12_arr = new NetAddress[some.length]; - for (int m = 0; m < some.length; m++) { + int some_conv_12_len = some.length; + NetAddress[] some_conv_12_arr = new NetAddress[some_conv_12_len]; + for (int m = 0; m < some_conv_12_len; m++) { long some_conv_12 = some[m]; - NetAddress some_conv_12_hu_conv = NetAddress.constr_from_ptr(some_conv_12); - some_conv_12_hu_conv.ptrs_to.add(this); + org.ldk.structs.NetAddress some_conv_12_hu_conv = org.ldk.structs.NetAddress.constr_from_ptr(some_conv_12); + if (some_conv_12_hu_conv != null) { some_conv_12_hu_conv.ptrs_to.add(this); }; some_conv_12_arr[m] = some_conv_12_hu_conv; } this.some = some_conv_12_arr; @@ -63,8 +64,8 @@ public class Option_CVec_NetAddressZZ extends CommonBase { long ret = bindings.COption_CVec_NetAddressZZ_some(o != null ? Arrays.stream(o).mapToLong(o_conv_12 -> o_conv_12.ptr).toArray() : null); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } - Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret); - ret_hu_conv.ptrs_to.add(ret_hu_conv); + org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; return ret_hu_conv; } @@ -74,8 +75,8 @@ public class Option_CVec_NetAddressZZ extends CommonBase { public static Option_CVec_NetAddressZZ none() { long ret = bindings.COption_CVec_NetAddressZZ_none(); if (ret >= 0 && ret <= 4096) { return null; } - Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret); - ret_hu_conv.ptrs_to.add(ret_hu_conv); + org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; return ret_hu_conv; } @@ -93,8 +94,8 @@ public class Option_CVec_NetAddressZZ extends CommonBase { long ret = bindings.COption_CVec_NetAddressZZ_clone(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret); - ret_hu_conv.ptrs_to.add(this); + org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; }