[Bf-blender-cvs] [de71f7a] id-remap: Fix deadlock. Would be really cool if Main spinlock could be re-entrant. :|
Bastien Montagne
noreply at git.blender.org
Thu Oct 15 17:04:38 CEST 2015
Commit: de71f7ab8aacead1606e079dba17352df6d3e313
Author: Bastien Montagne
Date: Thu Oct 15 17:03:54 2015 +0200
Branches: id-remap
https://developer.blender.org/rBde71f7ab8aacead1606e079dba17352df6d3e313
Fix deadlock. Would be really cool if Main spinlock could be re-entrant. :|
===================================================================
M source/blender/windowmanager/intern/wm_operators.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 2fc89fa..8d2f97c 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3229,9 +3229,14 @@ static int wm_lib_relocate_exec_do(bContext *C, wmOperator *op, const bool reloa
BKE_main_id_flag_all(bmain, LIB_PRE_EXISTING, true);
+ /* XXX For now, locking is not reentrant so it's not safe to call core linking code with locked Main. */
+ BKE_main_unlock(bmain);
+
/* We do not want any instanciation here! */
wm_link_do(lapp_data, op->reports, bmain, NULL, NULL, false, false);
+ BKE_main_lock(bmain);
+
for (item_idx = 0, itemlink = lapp_data->items.list; itemlink; item_idx++, itemlink = itemlink->next) {
WMLinkAppendDataItem *item = itemlink->link;
ID *old_id = item->customdata;
More information about the Bf-blender-cvs
mailing list