Fix potential dereference when starting avalon with all new work.
diff --git a/driver-avalon.c b/driver-avalon.c
index 398920d..92ccf0e 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -940,7 +940,7 @@ static void *avalon_send_tasks(void *userdata)
break;
}
- if (likely(j < avalon->queued && !info->overheat)) {
+ if (likely(j < avalon->queued && !info->overheat && avalon->works[i])) {
info->idle = false;
avalon_init_task(&at, 0, 0, info->fan_pwm,
info->timeout, info->asic_count,