diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-12-23 16:10:24 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-12-23 16:10:24 +0300 |
commit | d71009d980284c485ec1b431ee85e918410eb526 (patch) | |
tree | ecb36eb5b14e64f498a9c0246c1ad49e9c10aa94 /release/scripts/startup/bl_ui | |
parent | 025c9214165ca9e43d3c281c326bf4887c32d642 (diff) |
Avoid exception when no weight paint settings exist
Just an extra check for `None` before accessing its properties.
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 2 |
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 |