[Bf-blender-cvs] [e12f42946f7] master: Fix T65092: error with gizmos using freed keymaps

Campbell Barton noreply at git.blender.org
Sat May 25 04:50:26 CEST 2019


Commit: e12f42946f75d0883c17788521ccf7621e28c82c
Author: Campbell Barton
Date:   Sat May 25 12:37:25 2019 +1000
Branches: master
https://developer.blender.org/rBe12f42946f75d0883c17788521ccf7621e28c82c

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.

===================================================================

M	source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c

===================================================================

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);
 }



More information about the Bf-blender-cvs mailing list