1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Profile load failure null reference fix possibly fixes #183

This commit is contained in:
SpoinkyNL 2016-10-25 17:55:36 +02:00
parent 00a7c4f351
commit 2073c5fdea
4 changed files with 18 additions and 4 deletions

View File

@ -206,6 +206,10 @@
<HintPath>..\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Rocks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MoonSharp.Interpreter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=921e73ce94aa17f8, processorArchitecture=MSIL">
<HintPath>..\packages\MoonSharp.2.0.0.0\lib\net40-client\MoonSharp.Interpreter.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NAudio, Version=1.7.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NAudio.1.7.3\lib\net35\NAudio.dll</HintPath>
<Private>True</Private>
@ -885,6 +889,9 @@
<Name>ColorBox</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Profiles\Lua\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\CUE.NET.1.1.0.2\build\net45\CUE.NET.targets" Condition="Exists('..\packages\CUE.NET.1.1.0.2\build\net45\CUE.NET.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

View File

@ -137,7 +137,7 @@ namespace Artemis.DAL
}
catch (Exception e)
{
Logger.Error("Failed to load profile: {0} - {1}", path, e.InnerException.Message);
Logger.Error("Failed to load profile: {0} - {1}", path, e);
}
}
}

View File

@ -115,9 +115,15 @@ namespace Artemis.Modules.Games.UnrealTournament
private void InstallGif()
{
var gif = Resources.redeemer;
ProfileProvider.InsertGif(ProfileProvider.GetAll()
.Where(p => (p.GameName == "UnrealTournament") && (p.Name == "Default")), "Redeemer GIF", gif,
"redeemer");
if (gif == null)
return;
var utProfiles = ProfileProvider.GetAll()?
.Where(p => (p.GameName == "UnrealTournament") && (p.Name == "Default")).ToList();
if (utProfiles == null || !utProfiles.Any())
return;
ProfileProvider.InsertGif(utProfiles, "Redeemer GIF", gif, "redeemer");
}
}
}

View File

@ -13,6 +13,7 @@
<package id="MahApps.Metro" version="1.3.0" targetFramework="net461" />
<package id="MahApps.Metro.Resources" version="0.6.1.0" targetFramework="net452" />
<package id="Mono.Cecil" version="0.9.6.4" targetFramework="net461" />
<package id="MoonSharp" version="2.0.0.0" targetFramework="net461" />
<package id="NAudio" version="1.7.3" targetFramework="net452" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" />
<package id="Ninject" version="3.2.2.0" targetFramework="net452" />