summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.js b/server.js
index aba9aa3..69b3162 100644
--- a/server.js
+++ b/server.js
@@ -2870,7 +2870,7 @@ wss.on("connection", (socket, req) => {
try {
let game = SQL_SELECT_GAME.get(socket.game_id)
- if (game.title_id !== socket.title_id)
+ if (!game || game.title_id !== socket.title_id)
return socket.close(1000, "Invalid game ID.")
let players = socket.players = SQL_SELECT_PLAYERS_WITH_NAME.all(socket.game_id)