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