controller: prevent nullreference exceptions for checking the version

This commit is contained in:
Hylke Bons 2011-06-09 02:10:50 +01:00
parent 169b5dfd7a
commit 5be306ce93

View file

@ -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 ();