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