Skip to content

Commit 9b6ce47

Browse files
committed
fix: crash
1 parent 9eb0b91 commit 9b6ce47

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

persistence.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,12 @@ func (s *Server) SaveState() error {
7272
})
7373
}
7474

75+
// Get host ID from room state (room.Host can be nil after disconnection)
76+
hostID := room.State.HostID
77+
7578
persistentRoom := PersistentRoom{
7679
Code: room.Code,
77-
HostID: room.Host.ID,
80+
HostID: hostID,
7881
State: room.State,
7982
DisconnectedUsers: room.DisconnectedUsers,
8083
PendingSuggestions: pendingSuggestions,

0 commit comments

Comments
 (0)