diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 24eab621f5e..0d1c684e6a1 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -770,10 +770,8 @@ static PointerRNA rna_WindowManager_active_keyconfig_get(PointerRNA *ptr) wmWindowManager *wm = ptr->data; wmKeyConfig *kc; - for (kc = wm->keyconfigs.first; kc; kc = kc->next) - if (strcmp(kc->idname, U.keyconfigstr) == 0) - break; - + kc = BLI_findstring(&wm->keyconfigs, U.keyconfigstr, offsetof(wmKeyConfig, idname)); + if (!kc) kc = wm->defaultconf; |