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