Browse Source

Check for presence of thr in icarus get nonce for startup nonce testing to work.

Con Kolivas 12 years ago
parent
commit
e22035f024
1 changed files with 1 additions and 1 deletions
  1. 1 1
      driver-icarus.c

+ 1 - 1
driver-icarus.c

@@ -497,7 +497,7 @@ static int icarus_get_nonce(struct cgpu_info *icarus, unsigned char *buf, struct
 		return ICA_NONCE_OK;
 		return ICA_NONCE_OK;
 
 
 	rc = SECTOMS(tdiff(tv_finish, tv_start));
 	rc = SECTOMS(tdiff(tv_finish, tv_start));
-	if (thr->work_restart) {
+	if (thr && thr->work_restart) {
 		applog(LOG_DEBUG, "Icarus Read: Work restart at %d ms", rc);
 		applog(LOG_DEBUG, "Icarus Read: Work restart at %d ms", rc);
 		return ICA_NONCE_RESTART;
 		return ICA_NONCE_RESTART;
 	}
 	}