[tasque] [hm] Fixes crash when backend is loaded. (bgo #579428)



commit e875a71b2123a56bf2d852927e70a6dd0a79d9e1
Author: Mario Carrion <mario carrion mx>
Date:   Tue Apr 20 12:16:32 2010 -0400

    [hm] Fixes crash when backend is loaded. (bgo #579428)

 src/Backends/Hiveminder/HmBackend.cs |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/Backends/Hiveminder/HmBackend.cs b/src/Backends/Hiveminder/HmBackend.cs
index abc91d4..89417a0 100644
--- a/src/Backends/Hiveminder/HmBackend.cs
+++ b/src/Backends/Hiveminder/HmBackend.cs
@@ -94,7 +94,6 @@ namespace Tasque.Backends.HmBackend
 
 			runRefreshEvent = new AutoResetEvent(false);
 			runningRefreshThread = false;
-			refreshThread  = new Thread(RefreshThreadLoop);
 		}
 
 		void HandleRowChanged(object o, Gtk.RowChangedArgs args)
@@ -203,8 +202,7 @@ namespace Tasque.Backends.HmBackend
 			categoryListStore.SetValue (iter, 0, allCategory);
 			
 			runningRefreshThread = true;
-			Logger.Debug("ThreadState: " + refreshThread.ThreadState);
-			if (refreshThread.ThreadState == ThreadState.Running) {
+			if (refreshThread == null || refreshThread.ThreadState == ThreadState.Running) {
 				Logger.Debug ("RtmBackend refreshThread already running");
 			} else {
 				if (!refreshThread.IsAlive) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]