Browse Source

core: check if GPU thread is disabled before checking if it's waiting on getwork.

Otherwise the watchdog thread segfaults on checking an uninitialised
thr->getwork value.
build-mingw
Noel Maersk 11 years ago
parent
commit
106dbee1f9
  1. 4
      sgminer.c

4
sgminer.c

@ -7160,8 +7160,8 @@ static void *watchdog_thread(void __maybe_unused *userdata)
} }
#endif #endif
/* Thread is waiting on getwork or disabled */ /* Thread is disabled or waiting on getwork */
if (thr->getwork || *denable == DEV_DISABLED) if (*denable == DEV_DISABLED || thr->getwork)
continue; continue;
if (cgpu->status != LIFE_WELL && (now.tv_sec - thr->last.tv_sec < WATCHDOG_SICK_TIME)) { if (cgpu->status != LIFE_WELL && (now.tv_sec - thr->last.tv_sec < WATCHDOG_SICK_TIME)) {

Loading…
Cancel
Save