Browse Source

Bugfix: watchdog: Use processor thr_info even if it isn't a real thread

Luke Dashjr 13 years ago
parent
commit
4a7a3929b0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      miner.c

+ 2 - 1
miner.c

@@ -7331,7 +7331,8 @@ static void *watchdog_thread(void __maybe_unused *userdata)
 		for (i = 0; i < total_devices; ++i) {
 			struct cgpu_info *cgpu = devices[i];
 			struct thr_info *thr;
-			for (int thrid = 0; thrid < cgpu->threads; ++thrid) {
+			int threadobjs = cgpu->threads ?: 1;
+			for (int thrid = 0; thrid < threadobjs; ++thrid) {
 				thr = cgpu->thr[thrid];
 				if (!thr->q->frozen)
 					break;