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