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

Thanks to @nesse for the fix
This commit is contained in:
2014-12-18 14:29:24 +01:00
parent f0f1c7995b
commit 85f6fc501c

View File

@@ -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