Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-02-02 19:45:07 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-02-02 19:45:07 +0300
commit23e3dbb726beb5d551cda3d59833ab10474d5f63 (patch)
tree3049a03294dafc8e9fbf0d3ddc766b32725dc2ad /source/blender
parent2c82e748c1eaa25a8a5202c8360d8073d4a81c6f (diff)
Selection: avoid uninitialized memory read with occlusion queries
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/intern/gpu_select.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_select.c b/source/blender/gpu/intern/gpu_select.c
index 0515334feec..51721426bca 100644
--- a/source/blender/gpu/intern/gpu_select.c
+++ b/source/blender/gpu/intern/gpu_select.c
@@ -158,7 +158,7 @@ bool GPU_select_load_id(unsigned int id)
g_query_state.active_query++;
g_query_state.query_issued = true;
- if (g_query_state.mode == GPU_SELECT_NEAREST_SECOND_PASS) {
+ if (g_query_state.mode == GPU_SELECT_NEAREST_SECOND_PASS && g_query_state.index < g_query_state.oldhits) {
if (g_query_state.buffer[g_query_state.index * 4 + 3] == id) {
g_query_state.index++;
return true;