Fix T91931: Thumbnail Missing Region

Fixes a crash when blend thumbnails set to Camera View when there is
no camera, which resulted in use of a null region.

See D12748 for more details.

Differential Revision: https://developer.blender.org/D12748

Reviewed by Campbell Barton
This commit is contained in:
Harley Acheson 2021-10-24 22:01:20 -07:00
parent 82ae7b990a
commit b714f9bf43
Notes: blender-bot 2023-02-13 17:31:04 +01:00
Referenced by issue #91931, Crash when saving the file without an active camera
1 changed files with 1 additions and 0 deletions

View File

@ -1644,6 +1644,7 @@ static ImBuf *blend_file_thumb_from_camera(const bContext *C,
area = BKE_screen_find_big_area(screen, SPACE_VIEW3D, 0);
if (area) {
v3d = area->spacedata.first;
region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
}
}