Update to support None
[ldk-java] / src / main / java / org / ldk / structs / HTLCUpdate.java
index f1bb07be604bc63830f3be4cddb8c379821ed61f..01e06eb7bd8f6623eda25a30b7e7d707805353d6 100644 (file)
@@ -11,7 +11,7 @@ public class HTLCUpdate extends CommonBase {
        }
 
        public HTLCUpdate(HTLCUpdate orig) {
-               super(bindings.HTLCUpdate_clone(orig.ptr & ~1));
+               super(bindings.HTLCUpdate_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }