Fix T46332: Can't select an object with OpenSubdiv enabled

The issue was introduced by a wrong fix for T46247. Now both reports should
be properly solved.
This commit is contained in:
Sergey Sharybin 2015-09-30 20:59:19 +05:00
parent 95763b8c8a
commit fabde2ab43
Notes: blender-bot 2023-05-22 12:40:41 +02:00
Referenced by issue #46332, Can't  select an object with OpenSubdiv enabled
1 changed files with 4 additions and 0 deletions

View File

@ -911,6 +911,10 @@ void ccgSubSurf_getMinMax(CCGSubSurf *ss, float r_min[3], float r_max[3])
{
int i;
BLI_assert(ss->skip_grids == true);
if (ss->osd_num_coarse_coords == 0) {
zero_v3(r_min);
zero_v3(r_max);
}
for (i = 0; i < ss->osd_num_coarse_coords; i++) {
/* Coarse coordinates has normals interleaved into the array. */
DO_MINMAX(ss->osd_coarse_coords[2 * i], r_min, r_max);