Browse Source

Check for *pth dereference on pthread_join

Con Kolivas 13 years ago
parent
commit
bbb797067f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cgminer.c

+ 1 - 1
cgminer.c

@@ -2810,7 +2810,7 @@ static void __kill_work(void)
 		if (thr && PTH(thr) != 0L)
 			pth = &thr->pth;
 		thr_info_cancel(thr);
-		if (pth)
+		if (pth && *pth)
 			pthread_join(*pth, NULL);
 	}