BKE_id_free(): avoid UI and DEG calls when tagged with LIB_TAG_NO_MAIN

This prevents threading issues & crashes from modifiers that create
temporary meshes.
This commit is contained in:
Sybren A. Stüvel 2018-05-09 14:36:04 +02:00
parent 03abe89661
commit 0353ff5d2f
1 changed files with 1 additions and 1 deletions

View File

@ -898,7 +898,7 @@ void BKE_id_free_ex(Main *bmain, void *idv, int flag, const bool use_flag_from_i
if (use_flag_from_idtag) {
if ((id->tag & LIB_TAG_NO_MAIN) != 0) {
flag |= LIB_ID_FREE_NO_MAIN;
flag |= LIB_ID_FREE_NO_MAIN | LIB_ID_FREE_NO_UI_USER | LIB_ID_FREE_NO_DEG_TAG;
}
else {
flag &= ~LIB_ID_FREE_NO_MAIN;