From 65f311dee229ba66c974df0e414341d6baee4115 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 4 Sep 2022 01:32:20 +0000 Subject: [PATCH] [TS] Update auto-generated TS CommonBase.mts --- ts/structs/CommonBase.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/structs/CommonBase.mts b/ts/structs/CommonBase.mts index 75630f91..0eb364b2 100644 --- a/ts/structs/CommonBase.mts +++ b/ts/structs/CommonBase.mts @@ -374,7 +374,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; -- 2.39.5