From e12f42946f75d0883c17788521ccf7621e28c82c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 25 May 2019 12:37:25 +1000 Subject: [PATCH] Fix T65092: error with gizmos using freed keymaps Caused by 5adfc51a0fc7f, sharing keymaps caused changing tools to unregister gizmos and remove their keymaps. Workaround for now by not removing the keymap. --- source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c index d4e1dbfac73..95cb86ef3cb 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c @@ -921,8 +921,12 @@ void WM_gizmomaptype_group_unlink(bContext *C, WM_gizmomaptype_group_free(gzgt_ref); } + /* TODO(campbell): Gizmos may share keymaps, for now don't + * remove however we could flag them as temporary/owned by the gizmo. */ +#if 0 /* Note, we may want to keep this keymap for editing */ WM_keymap_remove(gzgt->keyconf, gzgt->keymap); +#endif BLI_assert(WM_gizmomaptype_group_find_ptr(gzmap_type, gzgt) == NULL); }