controller: prevent nullreference exceptions for checking the version
This commit is contained in:
parent
169b5dfd7a
commit
5be306ce93
|
@ -998,9 +998,12 @@ namespace SparkleShare {
|
|||
Uri uri = new Uri ("http://www.sparkleshare.org/version");
|
||||
|
||||
web_client.DownloadStringCompleted += delegate (object o, DownloadStringCompletedEventArgs args) {
|
||||
if (args.Error != null)
|
||||
return;
|
||||
|
||||
string new_version = args.Result.Trim ();
|
||||
|
||||
if (Defines.VERSION.Equals (new_version)) {
|
||||
if (Version.Equals (new_version)) {
|
||||
if (VersionUpToDate != null)
|
||||
VersionUpToDate ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue