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