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