From 23e3dbb726beb5d551cda3d59833ab10474d5f63 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 2 Feb 2015 17:45:07 +0100 Subject: Selection: avoid uninitialized memory read with occlusion queries --- source/blender/gpu/intern/gpu_select.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/gpu/intern/gpu_select.c') 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; -- cgit v1.2.3