From 2209321f7817f349874cd03003c184408a286511 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 16 Jun 2021 12:30:48 +1000 Subject: Screen: simplify internal logic for new full-screen areas Creating a new full screen area had it's area initialized as empty, updating the screen then set the area to a 3D view (as a fallback), before the actual area type was set. This made setting the intended space-type run the 3D views exit callback on a 3D view without a View3D struct allocated, which the exit callback needed to account for. Resolve by calling ED_screen_change after the area type has been set. --- source/blender/editors/space_view3d/space_view3d.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source/blender/editors/space_view3d/space_view3d.c') diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index d560c1f9978..f17cee8056f 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -352,11 +352,6 @@ static void view3d_exit(wmWindowManager *UNUSED(wm), ScrArea *area) { BLI_assert(area->spacetype == SPACE_VIEW3D); View3D *v3d = area->spacedata.first; - /* Happens when freeing. */ - if (v3d == NULL) { - return; - } - MEM_SAFE_FREE(v3d->runtime.local_stats); } -- cgit v1.2.3