Commit e574114682fe1edc344b7e291eb9d9497d26ef92

Con Kolivas 2014-04-06T14:40:49

Avoid derefrence when calling statline before on hfa device during init sequence

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 8701a6d..7d154a5 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -1872,6 +1872,9 @@ static void hfa_statline_before(char *buf, size_t bufsiz, struct cgpu_info *hash
 	if (!hashfast->device_data)
 		return;
 	info = hashfast->device_data;
+	/* Can happen during init sequence */
+	if (!info->die_status)
+		return;
 	max_volt = 0.0;
 
 	for (i = 0; i < info->asic_count; i++) {