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