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