1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-13 06:01:03 +00:00

Thread info struct should be initialized/allocated for disabled devices, too.

This commit is contained in:
troky 2014-07-01 09:24:22 +02:00
parent 6f8d38ee11
commit dc3ec7907e

View File

@ -8122,15 +8122,15 @@ static void restart_mining_threads(unsigned int new_n_threads)
for (i = 0; i < total_devices; ++i) {
struct cgpu_info *cgpu = devices[i];
cgpu->thr = (struct thr_info **)malloc(sizeof(struct thr_info *) * (cgpu->threads+1));
cgpu->thr[cgpu->threads] = NULL;
cgpu->status = LIFE_INIT;
if (cgpu->deven == DEV_DISABLED && opt_removedisabled) {
cgpu->threads = 0;
continue;
}
cgpu->thr = (struct thr_info **)malloc(sizeof(struct thr_info *) * (cgpu->threads+1));
cgpu->thr[cgpu->threads] = NULL;
cgpu->status = LIFE_INIT;
for (j = 0; j < cgpu->threads; ++j, ++k)
{
thr = mining_thr[k];