Skip to content

Commit

Permalink
Merge pull request #2488 from Nexus-Mods/feat/left-menu-rework
Browse files Browse the repository at this point in the history
Fix null left menu exception
  • Loading branch information
Al12rs authored Jan 16, 2025
2 parents 1fa31c6 + 470d6b2 commit 9cafcfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/NexusMods.App.UI/Controls/Spine/SpineViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ public SpineViewModel(
workspace.Id,
workspaceController
);
if (leftMenu != null)

if (leftMenu == null)
{
_leftMenus.Add(workspace.Id, leftMenu);
throw new InvalidDataException("LeftMenu factory returned a null view model");
}

throw new InvalidDataException("LeftMenu factory returned a null view model");
_leftMenus.Add(workspace.Id, leftMenu);
}
catch (Exception e)
{
Expand Down

0 comments on commit 9cafcfb

Please sign in to comment.