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