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