Fix crash on opening About's details, version 0.9.2.31

This commit is contained in:
Peter Kirmeier 2020-05-21 12:52:10 +02:00
parent 1cb0aaaa49
commit f31afbda39
2 changed files with 8 additions and 5 deletions

View file

@ -35,5 +35,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.2.29")]
[assembly: AssemblyFileVersion("0.9.2.29")]
[assembly: AssemblyVersion("0.9.2.31")]
[assembly: AssemblyFileVersion("0.9.2.31")]

View file

@ -192,9 +192,12 @@ namespace SystemTrayMenu.UserInterface
private static DateTime AssemblyLastWriteTime(Assembly a)
{
DateTime assemblyLastWriteTime = DateTime.MaxValue;
if (!string.IsNullOrEmpty(a.Location))
{
assemblyLastWriteTime = File.GetLastWriteTime(a.Location);
if (!a.IsDynamic) // Location property not available for dynamic assemblies
{
if (!string.IsNullOrEmpty(a.Location))
{
assemblyLastWriteTime = File.GetLastWriteTime(a.Location);
}
}
return assemblyLastWriteTime;