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

Loading…
Cancel
Save