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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2017-01-09 12:43:23 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-01-09 12:43:23 +0300
commit9c756162aed5354ff3d4fd7ba6c84253b39d14fa (patch)
tree18d868470ba1224b29a44ef366da5fe719741047 /source
parente713009e9b83bc7a43443712799c7a24c9dec1cf (diff)
Fix T50385: Deadlock in BKE_libblock_remap_locked.
Am pretty sure node update should not touch to Main database like that, but for now let's allow it, I guess the hack is needed for things like Sverchok. ;)
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/library_remap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index f76fc628ed0..d7d566a9ec0 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -562,8 +562,14 @@ void BKE_libblock_remap_locked(
default:
break;
}
+
/* Node trees may virtually use any kind of data-block... */
+ /* XXX Yuck!!!! nodetree update can do pretty much any thing when talking about py nodes,
+ * including creating new data-blocks (see T50385), so we need to unlock main here. :(
+ * Why can't we have re-entrent locks? */
+ BKE_main_unlock(bmain);
libblock_remap_data_postprocess_nodetree_update(bmain, new_id);
+ BKE_main_lock(bmain);
/* Full rebuild of DAG! */
DAG_relations_tag_update(bmain);