Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-09-11 12:50:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-11 13:04:34 +0300
commitd96b141666c17ab2aaba750286b3affc9bef0288 (patch)
treea0db1dfb21d4de3383339422257605c82932ce4e /source/blender/editors/mesh
parentc27d00cde08ab32718af326f6b72ccfdf3ef073a (diff)
Fix T79464: Crash adding objects without an active screen
Running add-objects operator without an active screen would crash as CTX_data_edit_object would return NULL in this case. This could happen when adding objects from frame-change handlers for e.g. In the case of adding new objects there is no need for a context lookup, pass this directly to ED_object_editmode_exit_ex.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 3c426e5d2b1..b7bf6230f22 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -104,7 +104,7 @@ static void make_prim_finish(bContext *C,
/* userdef */
if (exit_editmode) {
- ED_object_editmode_exit(C, EM_FREEDATA);
+ ED_object_editmode_exit_ex(CTX_data_main(C), CTX_data_scene(C), obedit, EM_FREEDATA);
}
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit);
}