Provide human versions of trait interfaces, with a bunch of fixes to make it work
[ldk-java] / src / main / java / org / ldk / structs / NetworkGraph.java
index 1bb8f5d89be87024feb4521896b2db8ebd2b2eaf..cb8f31f9f4b1ab9ce7e909138a6c7163dc87ce12 100644 (file)
@@ -11,7 +11,7 @@ public class NetworkGraph extends CommonBase {
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
-               bindings.NetworkGraph_free(ptr);
+               if (ptr != 0) { bindings.NetworkGraph_free(ptr); }
        }
 
        public byte[] write(NetworkGraph obj) {