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