Add NULL check for transform manipulator

Removes need for empty keymap
This commit is contained in:
Campbell Barton 2018-04-30 12:13:04 +02:00
parent 5ea85d0b04
commit 98fe9da37d
1 changed files with 1 additions and 1 deletions

View File

@ -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;