Merge pull request #58428 from lawnjelly/giprobe_gizmo_fix

Fix GIProbe gizmo out of bounds crash
This commit is contained in:
Rémi Verschelde 2022-02-22 19:51:54 +01:00 committed by GitHub
commit f35a680aa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2818,13 +2818,8 @@ void GIProbeGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
continue;
}
Vector2 dir;
dir[j] = 1.0;
Vector2 ta, tb;
int j_n1 = (j + 1) % 3;
int j_n2 = (j + 2) % 3;
ta[j_n1] = 1.0;
tb[j_n2] = 1.0;
for (int k = 0; k < 4; k++) {
Vector3 from = aabb.position, to = aabb.position;