Provide human versions of trait interfaces, with a bunch of fixes to make it work
[ldk-java] / src / main / java / org / ldk / structs / UpdateAddHTLC.java
index 7e33edf0a6c90251affea97b6fa9e66f5b055723..c4aa0936e2a54246620bb30f46b14271fd37e783 100644 (file)
@@ -11,7 +11,7 @@ public class UpdateAddHTLC extends CommonBase {
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
-               bindings.UpdateAddHTLC_free(ptr);
+               if (ptr != 0) { bindings.UpdateAddHTLC_free(ptr); }
        }
 
        public static UpdateAddHTLC constructor_clone(UpdateAddHTLC orig) {