diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index d89b20c..cd4f967 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -786,7 +786,7 @@ namespace DS4Windows FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); string version = fvi.FileVersion; string newversion = File.ReadAllText(appdatapath + "\\version.txt").Trim(); - if (version.Replace(',', '.').CompareTo(newversion) != 0) + if (!string.IsNullOrWhiteSpace(newversion) && version.Replace(',', '.').CompareTo(newversion) != 0) { if ((DialogResult)this.Invoke(new Func(() => { return MessageBox.Show(Properties.Resources.DownloadVersion.Replace("*number*", newversion), @@ -2097,7 +2097,7 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); string version2 = fvi.FileVersion; string newversion2 = File.ReadAllText(appdatapath + "\\version.txt").Trim(); - if (version2.Replace(',', '.').CompareTo(newversion2) != 0) + if (!string.IsNullOrWhiteSpace(newversion2) && version2.Replace(',', '.').CompareTo(newversion2) != 0) { if ((DialogResult)this.Invoke(new Func(() => {