[Java] Properly convert strings to/from Modified UTF-8
[ldk-java] / src / main / java / org / ldk / structs / Option_CVec_NetAddressZZ.java
index 66907b320091cb28026c164cab5adb7ac40b3aef..09c22d9b4eebf36eb0411c8d07708478740a83c9 100644 (file)
@@ -43,7 +43,7 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
                        for (int m = 0; m < some_conv_12_len; m++) {
                                long some_conv_12 = some[m];
                                org.ldk.structs.NetAddress some_conv_12_hu_conv = org.ldk.structs.NetAddress.constr_from_ptr(some_conv_12);
-                               some_conv_12_hu_conv.ptrs_to.add(this);
+                               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;
@@ -65,7 +65,8 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               for (NetAddress o_conv_12: o) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_conv_12); }; };
                return ret_hu_conv;
        }
 
@@ -76,7 +77,7 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
                long ret = bindings.COption_CVec_NetAddressZZ_none();
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(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;
        }
 
@@ -95,7 +96,7 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }