X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=typescript_strings.py;h=cc7b236315c6be51e1f593b74f3a04be3916fb4f;hb=305052451d456ee72ef4d37547d11c4ad610fbe7;hp=e4d4c3ebec8f06db3b58e7cc4e92e2bad767bb7b;hpb=d4ebc8460b78ba0e16bdc07fe2e53851686ac352;p=ldk-java diff --git a/typescript_strings.py b/typescript_strings.py index e4d4c3eb..cc7b2363 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -348,7 +348,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;