Browse Source

Bugfix: zero_stats: Only call cgpu function if it exists

Luke Dashjr 11 years ago
parent
commit
2cd7cc853d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      miner.c

+ 2 - 1
miner.c

@@ -7198,7 +7198,8 @@ void zero_stats(void)
 		cgpu->cgminer_stats.getwork_wait_max.tv_usec = 0;
 		mutex_unlock(&hash_lock);
 		
-		cgpu->drv->zero_stats(cgpu);
+		if (cgpu->drv->zero_stats)
+			cgpu->drv->zero_stats(cgpu);
 	}
 }