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