[Bf-blender-cvs] [98fe9da37d0] blender2.8: Add NULL check for transform manipulator

Campbell Barton noreply at git.blender.org
Mon Apr 30 12:15:41 CEST 2018


Commit: 98fe9da37d0aca024d953c487d18531bdde7905a
Author: Campbell Barton
Date:   Mon Apr 30 12:13:04 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB98fe9da37d0aca024d953c487d18531bdde7905a

Add NULL check for transform manipulator

Removes need for empty keymap

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

M	source/blender/editors/transform/transform_manipulator.c

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

diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index eea306c7ff0..a56d057cb3b 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -1287,7 +1287,7 @@ static void WIDGETGROUP_manipulator_setup(const bContext *C, wmManipulatorGroup
 		ScrArea *sa = CTX_wm_area(C);
 		wmKeyMap *km = WM_keymap_find_all(C, workspace->tool.keymap, sa->spacetype, RGN_TYPE_WINDOW);
 		/* Weak, check first event */
-		wmKeyMapItem *kmi = km->items.first;
+		wmKeyMapItem *kmi = km ? km->items.first : NULL;
 
 		if (kmi == NULL) {
 			man->twtype |= V3D_MANIP_TRANSLATE | V3D_MANIP_ROTATE | V3D_MANIP_SCALE;



More information about the Bf-blender-cvs mailing list