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