Fix T74173 Assert when scaling camera in viewport to zero
This commit is contained in:
parent
0fbcb824d0
commit
54e1b63567
Notes:
blender-bot
2023-02-13 23:22:49 +01:00
Referenced by issue #74173, Assert when scaling camera in viewport to zero
|
@ -1160,6 +1160,10 @@ void OVERLAY_camera_cache_populate(OVERLAY_Data *vedata, Object *ob)
|
|||
}
|
||||
else {
|
||||
copy_v3_fl3(scale, len_v3(ob->obmat[0]), len_v3(ob->obmat[1]), len_v3(ob->obmat[2]));
|
||||
/* Avoid division by 0. */
|
||||
if (ELEM(0.0f, scale[0], scale[1], scale[2])) {
|
||||
return;
|
||||
}
|
||||
invert_v3(scale);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue