Fix running transform without a region

Running transform in background mode or without a region would crash.
This commit is contained in:
Campbell Barton 2022-08-28 19:55:52 +10:00
parent f7ce20e340
commit 1f9d0acfa9
1 changed files with 1 additions and 1 deletions

View File

@ -1150,7 +1150,7 @@ static void calculateZfac(TransInfo *t)
SpaceImage *sima = t->area->spacedata.first;
t->zfac = 1.0f / sima->zoom;
}
else {
else if (t->region) {
View2D *v2d = &t->region->v2d;
/* Get zoom fac the same way as in
* `ui_view2d_curRect_validate_resize` - better keep in sync! */