Avoid passing NULL to strcmp() in stratum_thread()

This commit is contained in:
pooler 2013-06-15 14:05:39 +02:00
parent 805ea94a4d
commit fcd1162865

View file

@ -960,7 +960,8 @@ static void *stratum_thread(void *userdata)
}
}
if (strcmp(stratum.job.job_id, g_work.job_id) || !g_work_time) {
if (stratum.job.job_id &&
(strcmp(stratum.job.job_id, g_work.job_id) || !g_work_time)) {
pthread_mutex_lock(&g_work_lock);
stratum_gen_work(&stratum, &g_work);
time(&g_work_time);