diff options
author | Johan Walles <walles> | 2020-03-09 18:52:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-03-09 19:11:24 +0300 |
commit | 8bc8713beb8220cdac1475a2f8f99fda8c888b32 (patch) | |
tree | 2a816fa513a9578a7b6a28920d0962449d578591 /intern/cycles/util | |
parent | 58e6306b1533ef0b4668079eaac6f14b82cef313 (diff) |
Cleanup: avoid (harmless) race condition reported by Helgrind
Differential Revision: https://developer.blender.org/D7058
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_progress.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h index 379beaeeefa..23e49b4db7a 100644 --- a/intern/cycles/util/util_progress.h +++ b/intern/cycles/util/util_progress.h @@ -204,6 +204,8 @@ class Progress { float get_progress() { + thread_scoped_lock lock(progress_mutex); + if (total_pixel_samples > 0) { return ((float)pixel_samples) / total_pixel_samples; } |