Skip to content

Commit

Permalink
Fixed session deletion if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
SIsilicon committed Nov 26, 2024
1 parent d4275a4 commit d679fd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]) {
Expand Down

0 comments on commit d679fd3

Please sign in to comment.