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