[TS] Update auto-generated file
authorMatt Corallo <git@bluematt.me>
Sat, 3 Sep 2022 20:41:43 +0000 (20:41 +0000)
committerMatt Corallo <git@bluematt.me>
Sat, 3 Sep 2022 21:41:32 +0000 (21:41 +0000)
ts/structs/CommonBase.mts

index 8ce5766a2b089de0af3adaeb1d76bfd1e0202ba6..df2cad8ec388482aa6a22c6efed2355e019cfb6d 100644 (file)
@@ -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;