Fixes a crash when blend thumbnails set to Camera View when there is
no camera, which resulted in use of a null region.
My bad. The old code had a section like this:
if ((scene->camera == NULL) && (screen != NULL)) {
area = BKE_screen_find_big_area(screen, SPACE_VIEW3D, 0);
region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
if (region) {
v3d = area->spacedata.first;
}
}Because of how it was written it looked like the region check was unnecessary (since we get v3d from area, not region), but the assignment to region was indeed needed for the later call to ED_view3d_draw_offscreen_imbuf. This patch puts it back in but in a way that is less confusing.