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
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-12-23 16:10:24 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-12-23 16:10:24 +0300
commitd71009d980284c485ec1b431ee85e918410eb526 (patch)
treeecb36eb5b14e64f498a9c0246c1ad49e9c10aa94 /release
parent025c9214165ca9e43d3c281c326bf4887c32d642 (diff)
Avoid exception when no weight paint settings exist
Just an extra check for `None` before accessing its properties.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 01850676519..4d62d7072cb 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -698,6 +698,8 @@ class VIEW3D_PT_tools_weight_gradient(Panel, View3DPaintPanel):
@classmethod
def poll(cls, context):
settings = context.tool_settings.weight_paint
+ if settings is None:
+ return False
brush = settings.brush
return brush is not None