[Java] Update auto-generated Java bindings
[ldk-java] / typescript_strings.py
index 765a93cda50c1247350c1ce6fc959629c8cc088e..347aac691b1a35da548cc1ad5d30328e6c0415a1 100644 (file)
@@ -341,7 +341,7 @@ export class CommonBase {
        // In TypeScript, protected means "any subclass can access parent fields on instances of itself"
        // To work around this, we add accessors for other instances' protected fields here.
        protected static add_ref_from(holder: CommonBase, referent: object) {
-               holder.ptrs_to.push(referent);
+               if (holder !== null) { holder.ptrs_to.push(referent); }
        }
        protected static get_ptr_of(o: CommonBase) {
                return o.ptr;