diff --git a/ProjectLighthouse/Database.cs b/ProjectLighthouse/Database.cs index 25a9fb23..a8b5b45e 100644 --- a/ProjectLighthouse/Database.cs +++ b/ProjectLighthouse/Database.cs @@ -259,7 +259,7 @@ namespace LBPUnion.ProjectLighthouse public async Task RemoveUser(User user) { - this.Locations.Remove(user.Location); + if (user.Location != null) this.Locations.Remove(user.Location); LastContact? lastContact = await this.LastContacts.FirstOrDefaultAsync(l => l.UserId == user.UserId); if (lastContact != null) this.LastContacts.Remove(lastContact);