mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 16:38:37 +00:00
Fix crash when removing a user when user.Location is null
This commit is contained in:
parent
1774acda95
commit
b0ada585db
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue