Update to support None
[ldk-java] / src / main / java / org / ldk / structs / RoutingFees.java
index 215372fa7e71112bdef675084713fb4091c63af9..59f65ce5763cd066ed4601f115421f7332ed4f61 100644 (file)
@@ -11,29 +11,29 @@ public class RoutingFees extends CommonBase {
        }
 
        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);
        }