Ensure pthread_join succeeded before returning true
This commit is contained in:
		| @@ -644,12 +644,17 @@ internal bool read_strips(TiffReader *reader) { | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   bool image_loaded = true; | ||||
|  | ||||
|   for (u64 i = 0; i < reader->img.strip_count; ++i) { | ||||
|     pthread_join(threads[i], NULL); | ||||
|     if (pthread_join(threads[i], NULL) != 0) { | ||||
|       image_loaded = false; | ||||
|     } | ||||
|  | ||||
|     fclose(args[i].fp); | ||||
|   } | ||||
|  | ||||
|   return true; | ||||
|   return image_loaded; | ||||
| } | ||||
|  | ||||
| internal void *read_strip(void *arg) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user