Browse Source

Bugfix: ztex: statline existence depends on whether the libztex structure exists, not whether the cgpu is enabled

Fixes a crash when ztex_shutdown frees device_ztex before cgpu is disabled
Luke Dashjr 13 years ago
parent
commit
2bdc196536
1 changed files with 1 additions and 1 deletions
  1. 1 1
      driver-ztex.c

+ 1 - 1
driver-ztex.c

@@ -347,7 +347,7 @@ static uint64_t ztex_scanhash(struct thr_info *thr, struct work *work,
 static void ztex_statline_before(char *buf, struct cgpu_info *cgpu)
 {
 	char before[] = "               ";
-	if (cgpu->deven == DEV_ENABLED) {
+	if (cgpu->device_ztex) {
 		const char *snString = (char*)cgpu->device_ztex->snString;
 		size_t snStringLen = strlen(snString);
 		if (snStringLen > 14)