diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-10 22:03:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-10 22:03:05 +0300 |
commit | 4b0c2152db0e232ccc5e32942b5bf36ab87d362a (patch) | |
tree | e2ae3dfc43b25e3bc43dfd93fafb65a128280857 /source/blender/gpu/intern/gpu_context.cpp | |
parent | b207f4e4a2c520f65d2e936430ce67d418b86f46 (diff) |
Fix use of uninitialized GPU context memory in release builds.
Reported by valgrind, not sure it caused any real bugs.
Diffstat (limited to 'source/blender/gpu/intern/gpu_context.cpp')
-rw-r--r-- | source/blender/gpu/intern/gpu_context.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_context.cpp b/source/blender/gpu/intern/gpu_context.cpp index ce3eb64fa37..9c41d232fb0 100644 --- a/source/blender/gpu/intern/gpu_context.cpp +++ b/source/blender/gpu/intern/gpu_context.cpp @@ -80,12 +80,14 @@ struct GPUContext { #if TRUST_NO_ONE pthread_t thread; /* Thread on which this context is active. */ bool thread_is_used; +#endif GPUContext() { +#if TRUST_NO_ONE thread_is_used = false; +#endif current_fbo = 0; } -#endif }; #if defined(_MSC_VER) && (_MSC_VER == 1800) |