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