Browse Source

Fix null pointer issue when one chip on an X6500 is not initialized yet when reading temperature.

Jason Hughes 13 years ago
parent
commit
1c457a44e0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      driver-x6500.c

+ 2 - 0
driver-x6500.c

@@ -466,6 +466,8 @@ void x6500_get_temperature(struct cgpu_info *x6500)
 		struct thr_info *thr = x6500->thr[i];
 		struct thr_info *thr = x6500->thr[i];
 		fpga = thr->cgpu_data;
 		fpga = thr->cgpu_data;
 
 
+		if (!fpga) continue;
+
 		if (code[i] == 0xffff || !code[i]) {
 		if (code[i] == 0xffff || !code[i]) {
 			fpga->temp = 0;
 			fpga->temp = 0;
 			continue;
 			continue;