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