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:
parent
6f8d38ee11
commit
dc3ec7907e
@ -8122,15 +8122,15 @@ static void restart_mining_threads(unsigned int new_n_threads)
|
|||||||
for (i = 0; i < total_devices; ++i) {
|
for (i = 0; i < total_devices; ++i) {
|
||||||
struct cgpu_info *cgpu = 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) {
|
if (cgpu->deven == DEV_DISABLED && opt_removedisabled) {
|
||||||
cgpu->threads = 0;
|
cgpu->threads = 0;
|
||||||
continue;
|
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)
|
for (j = 0; j < cgpu->threads; ++j, ++k)
|
||||||
{
|
{
|
||||||
thr = mining_thr[k];
|
thr = mining_thr[k];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user