From 4b0c2152db0e232ccc5e32942b5bf36ab87d362a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 10 Jan 2019 20:03:05 +0100 Subject: Fix use of uninitialized GPU context memory in release builds. Reported by valgrind, not sure it caused any real bugs. --- source/blender/gpu/intern/gpu_context.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/gpu/intern') 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) -- cgit v1.2.3