From 060b714c5c250a1006d729a2f5d9d38756b85398 Mon Sep 17 00:00:00 2001 From: Havner Date: Sun, 16 Apr 2023 14:37:55 +0200 Subject: [PATCH] Fix for a crash introduced by mistake in fbc04cf (#485) --- HandheldCompanion/Managers/ProfileManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HandheldCompanion/Managers/ProfileManager.cs b/HandheldCompanion/Managers/ProfileManager.cs index 18cd473bd..6d09fa88d 100644 --- a/HandheldCompanion/Managers/ProfileManager.cs +++ b/HandheldCompanion/Managers/ProfileManager.cs @@ -398,7 +398,7 @@ public static void UpdateOrCreateProfile(Profile profile, ProfileUpdateSource so } // check if this is current profile - bool isCurrent = profile.Path.Equals(currentProfile.Path, StringComparison.InvariantCultureIgnoreCase); + bool isCurrent = currentProfile is null ? false : profile.Path.Equals(currentProfile.Path, StringComparison.InvariantCultureIgnoreCase); // refresh error code SanitizeProfile(profile);