fixed bug with scene resolution when one scene has no conditionals

This commit is contained in:
Rudis Muiznieks 2020-05-10 12:00:32 -05:00
parent 44ed5f165b
commit f7cab514cc
2 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@
<PackageReference Include="Epub4Net" Version="1.2.0" /> <PackageReference Include="Epub4Net" Version="1.2.0" />
<PackageReference Include="Ionic.Zip" Version="1.9.1.8" /> <PackageReference Include="Ionic.Zip" Version="1.9.1.8" />
<PackageReference Include="Markdig" Version="0.17.1" /> <PackageReference Include="Markdig" Version="0.17.1" />
<PackageReference Include="System.Security.Permissions" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" /> <PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -182,7 +182,7 @@
{ {
if (ConditionsMatch(scene, playerState) && if (ConditionsMatch(scene, playerState) &&
(newScene == null || newScene.Conditions == null || (newScene == null || newScene.Conditions == null ||
scene.Conditions.Count > newScene.Conditions.Count)) (scene.Conditions != null && scene.Conditions.Count > newScene.Conditions.Count)))
{ {
newScene = scene; newScene = scene;
} }