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