1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-05 03:24:26 +00:00

Make sure cgpu exists in the restart threads loop in cases of hotplug etc.

This commit is contained in:
Con Kolivas 2013-11-05 16:20:19 +11:00
parent 6bc691adb2
commit 043e9d9bab

View File

@ -4007,6 +4007,8 @@ static void restart_threads(void)
rd_lock(&mining_thr_lock);
for (i = 0; i < mining_threads; i++) {
cgpu = mining_thr[i]->cgpu;
if (unlikely(!cgpu))
continue;
mining_thr[i]->work_restart = true;
flush_queue(cgpu);
cgpu->drv->flush_work(cgpu);