[Bf-blender-cvs] [85f6fc5] master: Fix T42943: Crash with multiple calls to rna_info.BuildRNAInfo()

Campbell Barton noreply at git.blender.org
Thu Dec 18 14:31:39 CET 2014


Commit: 85f6fc501cc917e9253737ed7b380949055a532f
Author: Campbell Barton
Date:   Thu Dec 18 14:29:24 2014 +0100
Branches: master
https://developer.blender.org/rB85f6fc501cc917e9253737ed7b380949055a532f

Fix T42943: Crash with multiple calls to rna_info.BuildRNAInfo()

Thanks to @nesse for the fix

===================================================================

M	release/scripts/modules/rna_info.py

===================================================================

diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 3643ad8..353362e 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -487,6 +487,12 @@ def GetInfoOperatorRNA(bl_rna):
 
 
 def BuildRNAInfo():
+
+    # needed on successive calls to prevent stale data access
+    for cls in (InfoStructRNA, InfoFunctionRNA, InfoOperatorRNA, InfoPropertyRNA):
+        cls.global_lookup.clear()
+    del cls
+
     # Use for faster lookups
     # use rna_struct.identifier as the key for each dict
     rna_struct_dict = {}  # store identifier:rna lookups




More information about the Bf-blender-cvs mailing list