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