Merge pull request #117 from TheBlueMatt/2022-08-fix-npe
[ldk-java] / src / main / java / org / ldk / structs / DecodeError.java
index a6f4c4798156de2aee29d37a1973a68f8ff50cfd..1fd7d4a33eab5257c3e2bb310749c92acf774ddc 100644 (file)
@@ -33,8 +33,8 @@ public class DecodeError extends CommonBase {
                long ret = bindings.DecodeError_clone(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               DecodeError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new DecodeError(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               org.ldk.structs.DecodeError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DecodeError(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }