Fix #28180: crash running wm.keyconfigs.user.keymaps.new("My Keymap").
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 11 Aug 2011 11:56:02 +0000 (11:56 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 11 Aug 2011 11:56:02 +0000 (11:56 +0000)
There isn't much point in doing this at the moment, but shouldn't crash.

source/blender/windowmanager/intern/wm_keymap.c

index 2fb0a1b2ab9d6400a49e2d12bc1b9e9ac4d549e8..2dfe4d8ccdc57d9ace36a507bd85b3ec6f3d083e 100644 (file)
@@ -1009,7 +1009,8 @@ void WM_keyconfig_update(wmWindowManager *wm)
                        addonmap= WM_keymap_list_find(&wm->addonconf->keymaps, km->idname, km->spaceid, km->regionid);
 
                        /* diff */
-                       wm_keymap_diff_update(&U.user_keymaps, defaultmap, addonmap, km);
+                       if(defaultmap)
+                               wm_keymap_diff_update(&U.user_keymaps, defaultmap, addonmap, km);
                }
        }