Skip to content
Snippets Groups Projects
Commit ca40d350 authored by Germano Cavalcante's avatar Germano Cavalcante
Browse files

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 "_",".
parent 393c978b
Branches
Tags
No related merge requests found
...@@ -164,11 +164,11 @@ class SnapWidgetGroupCommon(bpy.types.GizmoGroup): ...@@ -164,11 +164,11 @@ class SnapWidgetGroupCommon(bpy.types.GizmoGroup):
return context_mode_check(context, cls.bl_idname) return context_mode_check(context, cls.bl_idname)
def init_tool(self, context, gizmo_name): def init_tool(self, context, gizmo_name):
self.widget = self.gizmos.new(gizmo_name) self._widget = self.gizmos.new(gizmo_name)
def __del__(self): def __del__(self):
if hasattr(self, "widget"): if hasattr(self, "_widget"):
object.__getattribute__(self.widget, 'end_snapwidget')() object.__getattribute__(self._widget, 'end_snapwidget')()
class SnapPointWidgetGroup(SnapWidgetGroupCommon): class SnapPointWidgetGroup(SnapWidgetGroupCommon):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment