From d679fd310ad86bd4ba4d3045434ecbc7446ced0e Mon Sep 17 00:00:00 2001 From: Roujel Williams Date: Tue, 26 Nov 2024 17:50:14 -0500 Subject: [PATCH] Fixed session deletion if undefined --- src/server/sessions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/sessions.ts b/src/server/sessions.ts index 07366cfc8..029d7f637 100644 --- a/src/server/sessions.ts +++ b/src/server/sessions.ts @@ -296,8 +296,8 @@ export class PlayerSession { } public deleteRegion(buffer: RegionBuffer) { - buffer.deref(); - this.regions.delete(buffer.id); + buffer?.deref(); + this.regions.delete(buffer?.id); } public createGradient(id: string, dither: number, patterns: Pattern[]) {