[Bf-extensions-cvs] [ca40d350] master: Fix mesh_snap_utilities_line crash when closing blender
Germano Cavalcante
noreply at git.blender.org
Fri Feb 12 02:54:54 CET 2021
Commit: ca40d35086be8e527755e09a1fc88c970e93fb6b
Author: Germano Cavalcante
Date: Thu Feb 11 22:53:12 2021 -0300
Branches: master
https://developer.blender.org/rBAca40d35086be8e527755e09a1fc88c970e93fb6b
Fix mesh_snap_utilities_line crash when closing blender
When the tool is active and the blender is closed, the `GizmoGroup` type
object is freed keeping some invalid RNA members.
This is probably an internal error, but for now just work around this
error by starting the object name with '_' since "RNA can't start with
a "_",".
===================================================================
M mesh_snap_utilities_line/widgets.py
===================================================================
diff --git a/mesh_snap_utilities_line/widgets.py b/mesh_snap_utilities_line/widgets.py
index 9879bef7..6c011b7a 100644
--- a/mesh_snap_utilities_line/widgets.py
+++ b/mesh_snap_utilities_line/widgets.py
@@ -164,11 +164,11 @@ class SnapWidgetGroupCommon(bpy.types.GizmoGroup):
return context_mode_check(context, cls.bl_idname)
def init_tool(self, context, gizmo_name):
- self.widget = self.gizmos.new(gizmo_name)
+ self._widget = self.gizmos.new(gizmo_name)
def __del__(self):
- if hasattr(self, "widget"):
- object.__getattribute__(self.widget, 'end_snapwidget')()
+ if hasattr(self, "_widget"):
+ object.__getattribute__(self._widget, 'end_snapwidget')()
class SnapPointWidgetGroup(SnapWidgetGroupCommon):
More information about the Bf-extensions-cvs
mailing list