Check device data exists on a hfa instance before trying to reinit it.
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 45f53c0..efbf754 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -1880,7 +1880,8 @@ static void hfa_statline_before(char *buf, size_t bufsiz, struct cgpu_info *hash
* again. */
static void hfa_reinit(struct cgpu_info *hashfast)
{
- hfa_running_shutdown(hashfast, hashfast->device_data);
+ if (hashfast && hashfast->device_data)
+ hfa_running_shutdown(hashfast, hashfast->device_data);
}
static void hfa_free_all_work(struct hashfast_info *info)