[Bf-blender-cvs] [a58a4f48bef] master: Edit Mesh Selection: Clear buffer before using in glReadPixel.

mano-wii noreply at git.blender.org
Thu Mar 28 00:34:44 CET 2019


Commit: a58a4f48bef4686ebb4088b78ba750a88151bff4
Author: mano-wii
Date:   Wed Mar 27 20:33:25 2019 -0300
Branches: master
https://developer.blender.org/rBa58a4f48bef4686ebb4088b78ba750a88151bff4

Edit Mesh Selection: Clear buffer before using in glReadPixel.

Areas out of bound are not written.

===================================================================

M	source/blender/editors/space_view3d/view3d_draw_legacy.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index 454315afa57..9498f007910 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -303,7 +303,7 @@ uint *ED_view3d_select_id_read_rect(ViewContext *vc, const rcti *clip, uint *r_b
 	uint width = BLI_rcti_size_x(clip);
 	uint height = BLI_rcti_size_y(clip);
 	uint buf_len = width * height;
-	uint *buf = MEM_mallocN(buf_len * sizeof(*buf), __func__);
+	uint *buf = MEM_callocN(buf_len * sizeof(*buf), __func__);
 
 	DRW_framebuffer_select_id_read(clip, buf);



More information about the Bf-blender-cvs mailing list