diff --git a/SparkleLib/SparkleFetcherBase.cs b/SparkleLib/SparkleFetcherBase.cs index 9c5758b7..e348d972 100644 --- a/SparkleLib/SparkleFetcherBase.cs +++ b/SparkleLib/SparkleFetcherBase.cs @@ -40,6 +40,8 @@ namespace SparkleLib { protected string remote_url; private Thread thread; + public abstract bool Fetch (); + public SparkleFetcherBase (string server, string remote_folder, string target_folder) { @@ -102,14 +104,13 @@ namespace SparkleLib { public void Dispose () { - this.thread.Abort (); - this.thread.Join (); + if (this.thread != null) { + this.thread.Abort (); + this.thread.Join (); + } } - public abstract bool Fetch (); - - private void DisableHostKeyCheckingForHost (string host) { string ssh_config_file_path = SparkleHelpers.CombineMore (