Update to support None
[ldk-java] / src / main / java / org / ldk / structs / ReplyShortChannelIdsEnd.java
index 895988fa97564857523abcd7f136342ebbb1d99a..c04cd58abe436eb9b1262a6db40a7a7fe5dab85d 100644 (file)
@@ -11,29 +11,29 @@ public class ReplyShortChannelIdsEnd extends CommonBase {
        }
 
        public ReplyShortChannelIdsEnd(ReplyShortChannelIdsEnd orig) {
-               super(bindings.ReplyShortChannelIdsEnd_clone(orig.ptr & ~1));
+               super(bindings.ReplyShortChannelIdsEnd_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_chain_hash(ReplyShortChannelIdsEnd this_ptr) {
-               byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_hash(ReplyShortChannelIdsEnd this_ptr, byte[] val) {
-               bindings.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr.ptr & ~1, val);
+               bindings.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public boolean get_full_information(ReplyShortChannelIdsEnd this_ptr) {
-               boolean ret = bindings.ReplyShortChannelIdsEnd_get_full_information(this_ptr.ptr & ~1);
+               boolean ret = bindings.ReplyShortChannelIdsEnd_get_full_information(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_full_information(ReplyShortChannelIdsEnd this_ptr, boolean val) {
-               bindings.ReplyShortChannelIdsEnd_set_full_information(this_ptr.ptr & ~1, val);
+               bindings.ReplyShortChannelIdsEnd_set_full_information(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }