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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-01-24 19:44:13 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-01-24 19:45:09 +0300
commit7a353a703770ea1c63f24733fbb2e37eafcbf98c (patch)
tree8490b0e343df371d625071aa588bda30e020602f /source/blender/makesrna
parentb33615a080a127d4cd6d9952fc4158963f035fec (diff)
Fix T60350: Removed objects that are still in the outliner will crash Blender.
We need to force UI to fully redraw, BKE_id_delete & co won't do that for us.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index af2f007307b..806b1f6521b 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -118,6 +118,7 @@
#endif
#include "WM_api.h"
+#include "WM_types.h"
static void rna_idname_validate(const char *name, char *r_name)
@@ -135,6 +136,8 @@ static void rna_Main_ID_remove(
if (do_unlink) {
BKE_id_delete(bmain, id);
RNA_POINTER_INVALIDATE(id_ptr);
+ /* Force full redraw, mandatory to avoid crashes when running this from UI... */
+ WM_main_add_notifier(NC_WINDOW, NULL);
}
else if (ID_REAL_USERS(id) <= 0) {
const int flag = (do_id_user ? 0 : LIB_ID_FREE_NO_USER_REFCOUNT) |