Update to support None
[ldk-java] / src / main / java / org / ldk / structs / PeerHandleError.java
index 391cb4705693cd35b00ddb7eee7941d925a7da3b..24c350e8606c9ae0692fe5734cd3a235866f9952 100644 (file)
@@ -11,13 +11,13 @@ public class PeerHandleError extends CommonBase {
        }
 
        public boolean get_no_connection_possible(PeerHandleError this_ptr) {
-               boolean ret = bindings.PeerHandleError_get_no_connection_possible(this_ptr.ptr & ~1);
+               boolean ret = bindings.PeerHandleError_get_no_connection_possible(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_no_connection_possible(PeerHandleError this_ptr, boolean val) {
-               bindings.PeerHandleError_set_no_connection_possible(this_ptr.ptr & ~1, val);
+               bindings.PeerHandleError_set_no_connection_possible(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }