diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-03 11:02:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-03 11:02:52 +0400 |
commit | 4cb4dc8432922413e40e0b8b93dc06e5710693de (patch) | |
tree | 01e9c624f6e98acce14ca028e4ade65dbadea01f | |
parent | f3e41046fe171175f4cb754d5e1b3161ae1adc8a (diff) |
remove assert recently added to EDBM_backbuf_check and explain odd logic.
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 76c08433b25..85b0cbbc318 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -266,8 +266,11 @@ bool EDBM_backbuf_border_init(ViewContext *vc, short xmin, short ymin, short xma int EDBM_backbuf_check(unsigned int index) { - BLI_assert(selbuf != NULL); + /* odd logic, if selbuf is NULL we assume no zbuf-selection is enabled + * and just ignore the depth buffer, this is error prone since its possible + * code doesn't set the depth buffer by accident, but leave for now. - Campbell */ if (selbuf == NULL) return 1; + if (index > 0 && index <= bm_vertoffs) return selbuf[index]; return 0; |