Skip to content
Snippets Groups Projects
Commit bc9b0b19 authored by Sergey Sharybin's avatar Sergey Sharybin
Browse files

Remove callback when screencast keys operator is cancelled.

Fixes #28505: Screencast Keys Add-on Crashes Blender
parent 6a09af70
No related branches found
No related tags found
No related merge requests found
......@@ -337,6 +337,13 @@ class ScreencastKeysStatus(bpy.types.Operator):
return {'PASS_THROUGH'}
def cancel(self, context):
if context.window_manager.display_keys:
context.region.callback_remove(self._handle)
context.window_manager.display_keys = False
return {'CANCELLED'}
def invoke(self, context, event):
if context.area.type == 'VIEW_3D':
if context.window_manager.display_keys == False:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment