Fix issues with .NET 5.

This commit is contained in:
Pieter-Jan Briers
2020-11-11 00:46:13 +01:00
parent 44ee2b7ab6
commit 0918e14827
2 changed files with 4 additions and 3 deletions

View File

@@ -142,7 +142,8 @@ namespace Content.Server.Preferences
int? nextSlot = null;
if (curPrefs.SelectedCharacterIndex == slot)
{
var (ns, profile) = curPrefs.Characters.FirstOrDefault(p => p.Key != message.Slot);
// That ! on the end is because Rider doesn't like .NET 5.
var (ns, profile) = curPrefs.Characters.FirstOrDefault(p => p.Key != message.Slot)!;
if (profile == null)
{
// Only slot left, can't delete.