Skip to content
Snippets Groups Projects
Commit 3302b5b2 authored by Vilém Duha's avatar Vilém Duha
Browse files

BlenderKit: fix recent stability issue with context creation for asset bar

parent 94ada3df
No related branches found
No related tags found
No related merge requests found
......@@ -654,7 +654,12 @@ def get_fake_context(context, area_type='VIEW_3D'):
C_dict = {} # context.copy() #context.copy was a source of problems - incompatibility with addons that also define context
C_dict.update(region='WINDOW')
if context.area is None or context.area.type != area_type:
try:
context = context.copy()
except:
context = {}
if context.get('area') is None or context.get('area').type != area_type:
w, a, r = get_largest_area(area_type=area_type)
override = {'window': w, 'screen': w.screen, 'area': a, 'region': r}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment