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