Files
test/source
Campbell Barton 486086d349 Fix logical error in window creation with an empty space
Resolve a crash in !104831, which exposed an error in window creation
with an empty space type.

Creating a new window with an empty space type would do the following:

- Create a new screen with a single empty area.
- Refresh the screen,
  - Initialize the area.
    - Convert the empty area into a 3D viewport.
    - Run SpaceType::init()

This doesn't cause any problems at the moment because `view3d_init`
isn't doing anything however !104831 accesses the View3D from
`area->spacedata.first` causing SCREEN_OT_area_dupli to crash.

Resolve by supporting an area setup callback for WM_window_open
so the area-data can be set before it's initialized.

The issue remains where an unknown/empty ScrArea::spacetype results in
a crash although it seems unlikely users run into this in practice.
Whatever the case, that can be resolved separately.
2023-07-20 17:06:13 +10:00
..