Skip to content

Commit

Permalink
Fix not being able to resolve binary conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
bcssov committed Jun 24, 2023
1 parent 871aa0a commit 7e269fd
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/IronyModManager/ViewModels/MainConflictSolverViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created : 03-18-2020
//
// Last Modified By : Mario
// Last Modified On : 06-22-2023
// Last Modified On : 06-24-2023
// ***********************************************************************
// <copyright file="MainConflictSolverViewModel.cs" company="Mario">
// Mario
Expand Down Expand Up @@ -597,15 +597,18 @@ protected virtual async Task EvaluateDefinitionValidity()
BackAllowed = false;
var virtualDefinitions = ModCompareSelector.VirtualDefinitions;
var patchDefinition = virtualDefinitions.FirstOrDefault(p => modPatchCollectionService.IsPatchMod(p.ModName));
patchDefinition.UseSimpleValidation = false;
if (virtualDefinitions.Any(p => p.UseSimpleValidation == null))
if (patchDefinition != null)
{
patchDefinition.UseSimpleValidation = null;
}
else if (virtualDefinitions.Any(p => p.UseSimpleValidation.GetValueOrDefault()))
{
patchDefinition.UseSimpleValidation = true;
}
patchDefinition.UseSimpleValidation = false;
if (virtualDefinitions.Any(p => p.UseSimpleValidation == null))
{
patchDefinition.UseSimpleValidation = null;
}
else if (virtualDefinitions.Any(p => p.UseSimpleValidation.GetValueOrDefault()))
{
patchDefinition.UseSimpleValidation = true;
}
}
var validationResult = modPatchCollectionService.Validate(patchDefinition);
if (!validationResult.IsValid)
{
Expand Down

0 comments on commit 7e269fd

Please sign in to comment.