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